Before you run the macro debugger, set the debugger breakpoints in the macro code. To do this, proceed as follows:
1.Select the required macro in one of the following ways:
•On the Macros tab, click
Macro editor. When working in macOS, you can also run the Tools > Macro editor command from the command menu. In the Macro editor window, select the desired macro in the list.
•On the Sidebar, click
Macros. In the Macros pane, hover the mouse cursor over the name of the required macro and click
More. In the drop-down list, select Edit.
2.Set the first debugger breakpoint. To do this, click to the right of the line number where you want to toggle a breakpoint. The breakpoint will be marked with the
icon.
3.Toggle other breakpoints by repeating these actions.
To delete a breakpoint, click it with the mouse.
To debug a macro, follow the steps below:
1.Click
Debug. The macro debugging process will start. If the macro code contains breakpoints, the debugging process will stop at the line that contains the first breakpoint. If there are no breakpoints, the debugging process will stop at the first line of the macro.
2.To control the debugging steps, use the following buttons:
Step into: Perform one debugging step or step into the body of the function, if there is one in the current debugging position.
Step over: Perform one debugging step without stepping into the body of the function.
Step out: Continue running the macro until leaving the function where the debugger is at the current position.
During debugging, the following areas are displayed in the Macro editor window:
–In progress: This area will display messages while debugging.
–Calls stack: The calls stack area.
–Variables: This area displays the values of local and global variables available at the current step of macro running. If the displayed variable is a table or an array, you can view its detailed contents by clicking
to the left of the variable name.
Debugging is terminated when the end of the macro is reached.
To interrupt the debugging process, click
Stop macro.