Debug initialization commands and parameter callbacks entered directly into the Mask Editor by:
Removing the terminating semicolon from a command to echo its results to the MATLAB®Command Window.
Placing akeyboard
command in the code to stop execution and give control to the keyboard.
To stop debugging the mask initialization callback code when an error is encountered, use the commanddbstop if caught error
.
You cannot debug icon drawing commands using the MATLAB Editor/Debugger. For information on icon drawing commands syntax, see图标绘制命令.
Debug initialization commands and parameter callbacks written in files using the MATLAB Editor/Debugger in the same way that you would with any other MATLAB program file.
When debugging initialization commands, you can view the contents of the mask workspace. However, when debugging parameter callbacks, you can only access the base workspace of the block. If you need the value of a mask parameter, useget_param
.