-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Using the debugger, when changing the context to a function that is higher up in the call stack, the local variables defined in that function are accessible via the terminal (e.g. they can be printed). However, when switching context back to a function that is deeper down in the call stack, the local variables are not accessible anymore.
To Reproduce
Let's say function2 defines a variable b, and function1 calls function2:
function function1()
function2();
end
function out = function2()
b = 2;
out = [];
end
- Save this file as
function1.m - Set a breakpoint in line 7 (
out = []). - type
bin the terminal - Click
function1in the call stack, then clickfunction2in the call stack, then typebin the terminal - See error
Unrecognized function or variable 'b'.
Expected behavior
b should be accessible since we changed the context back to function2, where it was defined.
Useful Information
- OS Version: "Red Hat Enterprise Linux" VERSION="8.10 (Ootpa)"
- VS Code Version: 1.96.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working