Stroboscope Debugger

Prasant Rekapalli and I developed an interactive debugger for Stroboscope that can significantly assist with the debugging of Stroboscope simulation models.

You can get the debugger here.

To install, extract StroboState.dll from the zip file you downloaded above to the Program directory of the Stroboscope installation. This directory is by default at C:\Program Files\Julio C. Martinez\Stroboscope Educational\Program.

To use the debugger you need to add the following statement as the first one in your model:

LOADADDON StroboState.dll;

When you run a model that contains the above statement, you will see a window similar to the one below just before the simulation starts:

image

The title of the window contains the current step in the simulation, the current simulation time, and the next simulation time, all separated by the pipe “|” symbol.

Just below the title bar is a row containing tabs labeled activities, instances, queues, nodes, links, and parameters. The information shown in the panes below it depend on the tab currently selected.

The left information pane contains a hierarchical tree whose organization depends on the tab. When the activities tab is selected, for example, the top level is for the activities, the next level is for the current instances of the selected activity, and the third level is for the resources contained in the instance. If a resource is a compound resource it will contain another level below for the resources that it contains.

The top right information pane contains a series of properties and corresponding values about whatever is selected in the left information pane. This may include attributes as well as the current value of related statistics.

The bottom right information pane contains a list of events that can be checked or unchecked. Checking an event sets a breakpoint. The first three events listed (All Events, Before Time Advance, and After Time Advance) are global and independent of what tab or element in the left information pane is selected. “All Events” essentially triggers every possible breakpoint, allowing you to follow model execution step by step. Before and after time advance trigger breakpoints as indicated, just before the clock is advanced, and just after it is advanced. The remaining options trigger breakpoints corresponding to whatever is selected in the left information pane.

Below the information panes are dismiss, continue, execute, and evaluate buttons.

The Dismiss button allows you to continue the simulation without any further debugging.

The Continue button runs the simulation until the next breakpoint is encountered, at which point the debugger updates all its information. You are then allowed to inspect the state of your model and to set/unset any breakpoints. If you have no breakpoints set, then Continue and Dismiss are equivalent.

The execute button executes in Stroboscope the statement typed in the text box to its left. You should not include the ending semicolon. If the statement is executed correctly, the space to the right of the button will display “SUCCESS”, otherwise it will display “ERROR”.

The evaluate button will evaluate the expression typed in the text box to its left, and will display the result to its right. White space is allowed in the expression without the need to enclose it single quotes.

We hope this debugger helps you be more productive in your Strobing!