Skip to Main Content Skip to Search
Product Documentation

se_getdbopts - SimEvents debugger options structure

Syntax

opts_struct = se_getdbopts

Description

opts_struct = se_getdbopts returns an empty options structure that you can configure and then use as an input to the sedebug function. You can set the StartFcn field of opts_struct to a cell array of strings representing commands that the debugger executes after the debugger session begins.

Output Arguments

opts_struct

Structure that describes options for a SimEvents debugger session. The StartFcn field of the structure is a cell array of strings.

Examples

Set breakpoints upon starting the debugger:

  1. At the MATLAB command prompt, create an options structure to use in future debugger sessions:

    opts_struct = se_getdbopts;
    opts_struct.StartFcn = {'tbreak 1', 'tbreak 2'};
  2. For a particular model, begin a debugger session using a syntax that includes opts_struct as an input argument. Using this argument causes the debugger to execute the commands in the opts_struct.StartFcn field automatically:

    sedebug('sedemo_outputswitch', opts_struct)

    The output in the MATLAB Command Window reflects model initialization followed by the setting of two breakpoints:

    *** SimEvents Debugger ***
    
    Functions | Help | Watch Video Tutorial
    
    %==============================================================================%
    Initializing Model sedemo_outputswitch
    Set b1 : Breakpoint for first operation at or after time 1
    Set b2 : Breakpoint for first operation at or after time 2
  3. Proceed in the simulation until the first breakpoint. At the sedebug>> prompt, enter:

    cont

    The output is:

    %==============================================================================%
    Initializing Time-Based Entity Generators
        %..........................................................................%
        Scheduling EntityGeneration Event (ev1)
        : EventTime = 1.000000000000000
        : Priority  = 500
        : Entity    = <none>
        : Block     = Time-Based Entity Generator
    
    Hit b1 : Breakpoint for first operation at or after time 1
    
    %==============================================================================%
    Executing EntityGeneration Event (ev1)                Time = 1.000000000000000
    : Entity = <none>                                     Priority = 500
    : Block  = Time-Based Entity Generator
  4. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

See Also

sedebug

How To

  


Free SimEvents Evaluation Kit

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS