Skip to content

Commit 2bc800c

Browse files
committed
Do not generate evalName when parent's is null
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.)
1 parent 85d4d1b commit 2bc800c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HLAdapter.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ class HLAdapter extends DebugSession {
802802
for( f in fields ) {
803803
try {
804804
var value = dbg.eval.readField(v, f);
805-
vars.push(makeVar(f, value, evalName+"."+f));
805+
vars.push(makeVar(f, value, evalName == null ? null : evalName+"."+f));
806806
} catch( e : Dynamic ) {
807807
vars.push({
808808
name : f,
@@ -817,7 +817,7 @@ class HLAdapter extends DebugSession {
817817
for( i in start...start+count ) {
818818
try {
819819
var value = get(i);
820-
vars.push(makeVar("" + i, value, evalName+"["+i+"]"));
820+
vars.push(makeVar("" + i, value, evalName == null ? null : evalName+"["+i+"]"));
821821
} catch( e : Dynamic ) {
822822
vars.push({
823823
name : "" + i,
@@ -898,7 +898,7 @@ class HLAdapter extends DebugSession {
898898
for( f in fields )
899899
try {
900900
var value = dbg.eval.readField(v, f.name);
901-
vars.push(makeVar(f.name, value, evalName+"."+f.name));
901+
vars.push(makeVar(f.name, value, evalName == null ? null : evalName+"."+f.name));
902902
} catch( e : Dynamic ) {
903903
vars.push({
904904
name : f.name,

0 commit comments

Comments
 (0)