Debugging a Macro
Macros are debugged from within the Macro Editor.
- The macro to be debugged is opened in the Macro Editor.
- Right-click a variable name in the macro source code and select Add Watch.
- The variable is added to the Watch tab.
After entering all variables and functions to be monitored, you can debug the macro using one of following actions:
|
Action |
Description |
|---|---|
|
Run |
Runs the macro without debugging. |
|
Debug |
Runs the entire macro in debug mode. Execution of the macro halts at previously defined breakpoints. |
|
Step Over |
Runs the macro line by line. If the current line contains a function call, the function is executed. The debugger continues in the next line of the macro. |
|
Step Into |
Runs the macro line by line. If the current line contains a function call, the debugger jumps into the function. The function is then executed line by line. After the function has finished, the debugger jumps back into the macro to the next line after the function call. |
|
Stop |
Halts the debugger at the current line. |
|
Reset |
Deletes any macro or debugger memory entries. Use reset to ensure a clean debug run after having debugged before, e.g. if you made corrections to the code and wish to debug anew. |
|
Breakpoint |
Marks the current line as a breakpoint. If you wish to use simple debugging instead of the line-by-line debugging methods, execution halts at a breakpoint. This enables you to monitor your previously defined variables and functions at pre-defined positions. Debugging this way is usually faster than using the line-by-line debugging methods, but requires knowledge about where to look for possible bugs. |
|
Set Line |
Runs and debugs the current line, i.e. the line of the current cursor position. |