
Debugging Process a nd Features
program is paused, assign a new value to the variable in the Command
Window, Workspace browser, or Array Editor. Then continue running or
stepping through the program. If the new value does not produce the expected
results, the program has a different problem.
Ending Debugging
After identifying a problem, end the debugging session. You must end a
debugg ing se ssion if you want t o change a nd save an M-file to correct a
problem, or if you want to run other functions in M ATLAB.
Note It is recommended that you quit debug mode before editing an M-file. If
you edit an M-file while in debug mode, y ou can g et unex pected results wh en
yourunthefile. IfyoudoeditanM-filewhileindebugmode,breakpoints
turn gray, indicating that results m ight not be reliable. See “Valid (Red) and
Invalid (Gray) B reakpoints” on page 6-109 for details.
If you attempt to s ave an edited M-file while in debug mode, a dialo g box
appears allowing you to exit debug m ode and save the file.
To end debug ging, click the Exit Debug Mode button , or select Exit Debug
Mode from the Debug menu.
You can instead use the function
dbquit or the Shift+F5 keyboard shortcut
to end debugging.
After quitting debugging, pause indicators in the Editor/Debugger display no
longer appear, and the normal p rompt
>> appears in the Command Window
instead of the debugging prompt,
K>>. You can no longer a ccess the call stack.
Disabling and Clearing Breakpoints
Disable a breakpoint to temporarily ignore it. Clear a breakpoint to remove it.
6-119
Commentaires sur ces manuels