Main Content

Stateflow.StateDebug

Debugger properties for state

    Description

    Use a Stateflow.StateDebug object to specify the debugger properties for a state, atomic subchart, or Simulink® based state.

    Creation

    Each state, atomic subchart, and Simulink based state has its own Stateflow.StateDebug object. To access the Stateflow.StateDebug object, use the Debug property for the Stateflow.State, Stateflow.AtomicSubchart, or Stateflow.SimulinkBasedState object.

    Properties

    expand all

    Stateflow® API objects have properties that correspond to the values you set in the Stateflow Editor. To access or modify a property, use dot notation. To access or modify multiple properties for multiple API objects, use the get and set functions, respectively. For more information, see Modify Properties and Call Functions of Stateflow Objects.

    Breakpoint properties for the state, atomic subchart, or Simulink based state, specified as a Stateflow.StateBreakpoints object with these properties:

    • OnEntry — Whether to set the On State Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

    • OnDuring — Whether to set the During State breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

    • OnExit — Whether to set the On State Exit breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

    For more information, see Set Breakpoints to Debug Charts.

    Examples

    collapse all

    Access the Stateflow.StateDebug and Stateflow.StateBreakpoints objects for the Stateflow.State object state.

    debug = state.Debug;
    breakpoints = debug.Breakpoints;

    Set the On State Entry, During State, and On State Exit breakpoints.

    breakpoints.OnEntry = true;
    breakpoints.OnDuring = true;
    breakpoints.OnExit = true;
    Introduced before R2006a