Skip to content

Commit 12ecdd4

Browse files
committed
fix(debugger): corrected handling of local variables in variables inspector
fixes #262
1 parent 049c905 commit 12ecdd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: packages/debugger/src/robotcode/debugger/debugger.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1442,20 +1442,24 @@ def get_variables(
14421442
)
14431443
elif entry.suite_id() == variables_reference:
14441444
globals = context.variables._global.as_dict()
1445+
vars = entry.get_first_or_self().variables()
1446+
vars_dict = vars.as_dict() if vars is not None else {}
14451447
result.update(
14461448
{
14471449
k: self._create_variable(k, v)
14481450
for k, v in context.variables._suite.as_dict().items()
1449-
if k not in globals or globals[k] != v
1451+
if (k not in globals or globals[k] != v) and (k in vars_dict)
14501452
}
14511453
)
14521454
elif entry.test_id() == variables_reference:
14531455
globals = context.variables._suite.as_dict()
1456+
vars = entry.get_first_or_self().variables()
1457+
vars_dict = vars.as_dict() if vars is not None else {}
14541458
result.update(
14551459
{
14561460
k: self._create_variable(k, v)
14571461
for k, v in context.variables._test.as_dict().items()
1458-
if k not in globals or globals[k] != v
1462+
if (k not in globals or globals[k] != v) and (k in vars_dict)
14591463
}
14601464
)
14611465
elif entry.local_id() == variables_reference:

0 commit comments

Comments
 (0)