When a macro is created, it is saved as a script file that can be fully debugged using the 'Active Script' window in debugging mode. To access this mode, click on the 'Play Macro' button in the Main Toolbar and then select the 'Edit' option.
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Play Edit Debug Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Play Edit Debug Button](macrosdebugbutton.jpg)
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Main Status TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Main Status](macrodebugintro.jpg)
The 'Active Script' window will initially appear empty. Click on the 'Open' button in the toolbar to display a dialog where you can choose the macro file (.zsm) want to debug.
When a macro file is opened, the macro debugging toolbar will become fully enabled. This will allow you to insert breakpoints, use step-into and step-over debugging technics, add watches and also evaluate expressions.
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Toolbar Buttons TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Toolbar Buttons](macrodebuggingtoolbar.jpg)
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Start Or Resume Execution Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Start Or Resume Execution Button](button_macro_play.jpg)
|
Start Or Resume Execution
Use this button to start or resume code execution after it has been paused.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Step Over Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Step Over Button](button_macro_stepover.jpg)
|
Step Over
Use this button to avoid executing a procedure line-by-line and execute it as a whole.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Step Into Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Step Into Button](button_macro_stepinto.jpg)
|
Step Into
Use this button to execute procedures line-by-line.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Run to Cursor Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Run to Cursor Button](button_macro_runtocursor.jpg)
|
Run To Cursor
Use this button to execute all preceding code to the cursor position.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Pause Execution Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Pause Execution Button](button_macro_pause.jpg)
|
Pause Execution
Use this button to pause code execution.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Add Breakpoint Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Add Breakpoint Button](button_macro_break.jpg)
|
Add Breakpoint
Use this button to set a breakpoint in the line you are currently positioned. Execution will pause every time it reaches the breakpoint.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Breakpoint List Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Breakpoint List Button](button_macro_breaklist.jpg)
|
Breakpoints List
Use this button to display a list of all established breakpoints in the macro and its properties.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Add Watch Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Add Watch Button](button_macro_watch.jpg)
|
Add Watch
Use this button to add a watch so you can monitor the value of a specific variable at any time in a real-time fashion.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Watches List Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Watches List Button](button_macro_watchlist.jpg)
|
Watches List
Use this button to display a list of all active watches with their current value.
|
![TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Evaluate Expression Button TN3270 IBM Mainframe TN5250 AS400 Terminal Emulation z/Scope Macro Script Edit Debug Evaluate Expression Button](button_macro_evaluate.jpg)
|
Evaluate Expression
Use this button to query the value of any variable at any time.
|
Related Topics
Using Macros
|