Skip to content

Commit

Permalink
Do not generate evalName when parent's is null
Browse files Browse the repository at this point in the history
Force vscode to use value in copy value in watch, instead of evaluating the evalName. (We can't use watch expr as evalName directly because they might contains hint or command.)
  • Loading branch information
yuxiaomao committed Jan 16, 2025
1 parent 85d4d1b commit 2bc800c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HLAdapter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class HLAdapter extends DebugSession {
for( f in fields ) {
try {
var value = dbg.eval.readField(v, f);
vars.push(makeVar(f, value, evalName+"."+f));
vars.push(makeVar(f, value, evalName == null ? null : evalName+"."+f));
} catch( e : Dynamic ) {
vars.push({
name : f,
Expand All @@ -817,7 +817,7 @@ class HLAdapter extends DebugSession {
for( i in start...start+count ) {
try {
var value = get(i);
vars.push(makeVar("" + i, value, evalName+"["+i+"]"));
vars.push(makeVar("" + i, value, evalName == null ? null : evalName+"["+i+"]"));
} catch( e : Dynamic ) {
vars.push({
name : "" + i,
Expand Down Expand Up @@ -898,7 +898,7 @@ class HLAdapter extends DebugSession {
for( f in fields )
try {
var value = dbg.eval.readField(v, f.name);
vars.push(makeVar(f.name, value, evalName+"."+f.name));
vars.push(makeVar(f.name, value, evalName == null ? null : evalName+"."+f.name));
} catch( e : Dynamic ) {
vars.push({
name : f.name,
Expand Down

0 comments on commit 2bc800c

Please sign in to comment.