Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mscript_debugging [2020/05/10 03:09]
admin removed
— (current)
Line 1: Line 1:
-=====Debugging MScript===== 
- 
-Often times you may need to step through MScript and see how each line of MScript does to AUT.  
- 
-You can pause the execution at any MScript and advance the execution one MScript line at a time. While execution is paused, you can then examine the AUT and even execution some ad-hoc MScript to help debug any issues you may have. 
- 
-There are several ways you can step through MScript as described in the following sections. 
- 
-==== Set Breakpoints==== 
- 
-You can set breakpoint on a specific MScript line or on a state or transition. 
- 
-To set a breakpoint at a specific MScript, open the MScript for the model by right mouse clicking on the //Model// node and selecting //MScript//. MScript should be displayed in the [[mScriptEditor|mScriptEditor]].  
- 
-Right mouse click on the line# to the left of the MScript line you wish to add breakpoint at and select //Toggle Breakpoint// 
- 
-You can set as many breakpoints as you need.  
- 
-Next time when model is executed in debug mode {{http://testoptimal.com/img/debug.png}}, the model should paused at the initial state.  
- 
-Click on {{http://testoptimal.com/img/debug.png}} again to advance the execution to the next breakpoint. 
- 
- 
-==== Step Next Line ==== 
- 
-You can step over current MScript line and have execution paused at the next MScript line by pressing the next MScript button {{http://testoptimal.com/img/stepover.png}}. 
- 
- 
-==== Run To Specific MScript Line ==== 
- 
-You can advance the execution from current breakpoint and have the execution paused at a specific MScript line identified by the line number by pressing {{http://testoptimal.com/img/stepline.png}}. Enter the line number of the MScript line you wish the execution to pause at. 
- 
- 
-==== Skip N Line ==== 
- 
-You can advance the execution by a specific number of MScript lines by pressing {{http://testoptimal.com/img/stepline.png}}. Enter the number of MScript lines you wish the execution to skip over and pause with the format like this: +5. 
- 
-==== AdHoc MScript ==== 
- 
-When the model is paused by any of the above method, you can use [[MonitorTab|Monitor Tab]] to execute any ad-hoc MScript. To do so, enter the MScript in the //Exec MScript// field and click "Execute" button. It reports the result from the execution of the MScript in the field right under the MScript area.