debugging

Navigation:  Simulator > Running a Simulation >

debugging

Previous pageReturn to chapter overviewNext page

20-sim has various tool to help you to pinpoint and resolve problems that may occur during a simulation.

Switch to Debug Mode: 20-sim is operating in Debug Mode when you see the Debug Mode button DebugMode. If your Simulator or Editor is in Fast Mode FastMode click on the button to change to Debug Mode.
Recompile your model: In the editor select Check Complete Model from the Model menu. This will recompile your model in Debug mode and show a maximum of warnings. If any warning looks suspicious, solve this first.
Breakpoints: Set breakpoints to monitor time or conditions between variables.
Run to the breakpoint: Use the Run command from the Simulation menu to run the simulation to a breakpoint. As soon as the breakpoint has been reached, the simulation will halt. The Output tab at the bottom of the Simulator will display which breakpoint was active.
Simulate Step-by-Step: Use the command One Step from the Simulation menu to simulate do one simulation step for the complete model.
Inspect the Results: After each step, open the Variable Chooser to inspect the various variables of the model. You can also switch to the Editor to inspect results at model level:
Submodels: Select a specific submodel and choose parameters or variables to inspect the parameters and variables of that submodel.
Equation submodels: Put the mouse pointer on top of an equation and point to a variable or parameter of interest. A box will appear, showing the numerical value associated with that variable or parameter.

ShowVariableValue

Use the mouse pointer to inspect numerical values.

Graphical submodels: Put the mouse pointer on top of a signal, bond or connection. A box will appear, showing the numerical value associated with that signal, bond or connection.

ShowSignalValue

ShowBondValue

Use the mouse pointer to inspect numerical values.