Using the Debugger's Command-Line Interface
Controlling the Debugger
In command-line mode, you control the debugger by entering commands
at the debugger command line in the MATLAB Command Window. The
debugger accepts abbreviations for debugger commands. See Simulink Debugger Commands for
a list of command abbreviations and repeatable commands.
Note
You can repeat some commands by entering an empty command (i.e.,
by pressing the Enter key) at the
command line. |
Back to Top
Method ID
Some of the Simulink software commands and messages use
method IDs to refer to methods. A method ID is an integer assigned
to a method the first time the method is invoked. The debugger assigns
method indexes sequentially, starting with 0.
Back to Top
Block ID
Some of the debugger commands and messages use block IDs to
refer to blocks. Block IDs are assigned to blocks while generating
the model's sorted lists during the compilation phase of the simulation.
A block ID has the form sid:bid, where sid is
an integer identifying the system that contains the block (either
the root system or a nonvirtual subsystem) and bid is
the position of the block in the system's sorted list. For example,
the block index 0:1 refers to the first block in
the model's root system. The slist command
shows the block ID for each debugged block in the model.
Back to Top
Accessing the MATLAB Workspace
You can enter any MATLAB expression at the sldebug prompt.
For example, suppose you are at a breakpoint and you are logging time
and output of your model as tout and yout.
The following command creates a plot.
(sldebug ...) plot(tout, yout)
You cannot display the value of a workspace variable whose name
is partially or entirely the same as that of a debugger command by
entering it at the debugger command prompt. You can, however, use
the eval command to work around this problem. For
example, use eval('s') to determine the value of s rather
then s(tep) the simulation.
Back to Top
 | Using the Debugger's Graphical User Interface | | Getting Online Help |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit