Skip to content

Commit 39cd1d6

Browse files
eregonandrykonchin
authored andcommitted
Handle early BindingLocalVariablesObject#getMembers for DAP
1 parent 5aca3a1 commit 39cd1d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/truffleruby/debug/BindingLocalVariablesObject.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ protected boolean hasMembers() {
4848
@ExportMessage
4949
@TruffleBoundary
5050
protected Object getMembers(boolean includeInternal) {
51+
if (binding == null) { // Not set yet
52+
return new VariableNamesObject(StringUtils.EMPTY_STRING_ARRAY);
53+
}
54+
5155
String[] variables = BindingNodes.LocalVariablesNode
5256
// There should be no duplicates since there is no scope above
5357
.listLocalVariablesWithDuplicates(binding.getFrame(), null)

0 commit comments

Comments
 (0)