|Home > Iris APIs > Debuggable state > simulationTime_runUntilDebuggableState()|
This function is a variant of
simulationTime_run(). They generally have the same semantics, except that this function sets up a global state in which simulation time stops automatically when all instances that have the
debuggable-state-request flag set also have the
debuggable-state-acknowledge flag set.
This is a global function and so does not take an
The simulation time might stop before reaching a debuggable state for the same reasons as for
simulationTime_run(), for example hitting breakpoints, or
To find out whether a debuggable state was reached, enable the
IRIS_SIMULATION_TIME_EVENT event source. The
REACHED_DEBUGGABLE_STATE bit in the
REASON field indicates whether a debuggable state was reached.
simulation_runUntilDebuggableState(), this does not cause the simulation time to stop progressing when all the instances enter a debuggable state.
These are the typical steps to inspect a model that supports debuggable state:
debuggableState_setRequest(request = true)on all instances that should be inspected and that support the
REACHED_DEBUGGABLE_STATEbit of the
IRIS_SIMULATION_TIME_EVENTto find out whether a debuggable state was reached. If not, ignore or re-iterate depending on the desired behavior.
debuggableState_setRequest(request = false)on all instances for which the request was previously set to true.