Main Content

Start the金宝appDebugger

You can start the debugger from either a Simulink®model window or from the MATLAB®Command Window.

Starting from a Model Window

  1. 我n a model window, on theDebugtab, selectBreakpoints List>Debug Model.

    打开调试器图形用户界面。看到Debugger Graphical User Interface.

  2. Continue selecting toolbar buttons.

Note

When running the debugger in graphical user interface (GUI) mode, you must explicitly start the simulation. For more information, seeStart a Simulation.

Note

When starting the debugger from the GUI, you cannot enter debugger commands in the MATLAB command window. For this, you must start the debugger from the command window using thesimorsldebugcommands.

Starting from the Command Window

  1. 我n the MATLAB Command Window, enter either

    • thesimcommand. For example, enter

      sim('vdp', 'StopTime', '10', 'debug', 'on')

    • or thesldebugcommand. For example, enter

      sldebug 'vdp'

    我n both cases, the example modelvdploads into memory, starts the simulation, and stops the simulation at the first block in the model execution list.

  2. The debugger opens and a debugger command prompt appears within the MATLAB command window. Continue entering debugger commands at this debugger prompt.

Related Examples

More About