the workspace, click the function in the function call stack. MATLAB opens the function in
the Live Editor and changes the current workspace to the workspace of the function.
Once the workspace is selected, you can view the values of the variables in it using the
Workspace browser or as a data tip in the Live Editor.
Add Breakpoints and Run
If there are lines of code in your file that you want to pause at every time you run, add
breakpoints at those lines. To add a breakpoint in the Live Editor, click the gray area to
the left on an executable line where you want to set the breakpoint. For example, click the
area next to line 3 in this code to add a breakpoint at that line. You also can use the F12
key to set a breakpoint.
When you run the file, MATLAB pauses at the line of code indicated by the breakpoint.
Clear Breakpoints
When you close and reopen a file, breakpoints are saved.
To clear a breakpoint, right-click the breakpoint and select Clear Breakpoint from the
context menu. You also can use the F12 key to clear the breakpoint.
19 Live Scripts and Functions