Documentation Center

  • Trial Software
  • Product Updates

Start the SimEvents Debugger

The SimEvents® debugger enables you to use MATLAB® functions to suspend a simulation at each step or breakpoint, and query simulation behavior. The debugger also creates a simulation log with detailed information about what happens during the simulation.

Before you simulate a system using the SimEvents debugger, make sure that the system is not currently simulating and that you are not running the Simulink® debugger on any system. Also ensure that the system contains at least one SimEvents block. The SimEvents debugger does not work on systems without these blocks.

To simulate a system using the SimEvents debugger, enter


at the MATLAB command prompt. sys is a string representing the system name. An example is sedebug('sedemo_outputswitch').

The results of starting the debugger are:

  • The output in the MATLAB Command Window indicates that the debugger is active and includes hyperlinks to sources of information.

    *** SimEvents Debugger ***
    Functions | Help | Watch Video Tutorial
    Initializing Model sedemo_outputswitch
  • The command prompt changes to sedebug>>. This notation is the debugger prompt where you enter commands.

  • The system starts initializing. At this point, you can inspect initial states or configure the debugger before blocks have started performing operations.

  • You cannot modify the system, modify parameters in the system or in its blocks, close the system, or end the MATLAB session until the debugger session ends. To end the debugger session, see Stop the Debugger.

Related Examples

Was this topic helpful?