Please enable JavaScript to view this site.


There are many possible types of breakpoints that can be set in the macros debugger.


Simple Breakpoints


The simplest break points are simply based on a line number and in such cases, the execution of a macro pauses unconditionally whenever it reaches that line.


You can set simple breakpoints that are based only on the line number, by clicking in the margin of the corresponding line in the macros debugger.


A red stop sign appears in the gutter of the source code, as seen in the example on the right, and a corresponding entry is added to the list of breakpoints displayed at the bottom right of the debugger.


Conditional Breakpoints


To specify conditional breakpoints (breakpoint which will only be triggered under certain conditions), click on the edit button at the right of the list of breakpoint conditions located at the bottom right of the debugger.


Conditions based on Line Numbers


At the top of the Breakpoints editor, you can specify that reaching a certain line of code will trigger a breakpoint.


As seen in the example on the right, the drop-down list of the Code line section opens-up and contains the entire source code of the current macro. the Breakpoints Editor.


Usually, if you only want a breakpoint to be based on a certain line of code, then you would simply click in the code's margin as described above in the Simple Breakpoints section. But, if your condition is based on both a line and variable, as we will see below, then this is a convenient manner of setting or modifying the breakpoints line condition.


Conditions based on Variables Values


In the Variable Value section located in the bottom half of the Breakpoints editor, you can specify that a breakpoint will be triggered based on the value of one of the system variables, or one of your own variables (those defined in the current macro).


Note that integers and dates are intrinsically the same, but that the user interface presents them differently to make the setting of breakpoints more convenient.


You can set both a line and a variable value condition, in which case a breakpoint would be triggered only  if both the code line is reached and the variable condition is true.


If you set a code line as an option of your breakpoint, the line number will be saved, not its contents. This means that if you modify the source code of a macro, the line breakpoints may be on the wrong line content, even thought they are still on the same line number.


The values that a variable must reach to cause a break in the execution of the macro do not have to be exact. You can set a breakpoint on an integer value being less than or more than a given value, a date being before or after a given date, and a string containing, or being contained by, another string, as shown in the example below.



If the line you select for a breakpoint contains no executable instructions, an error message will be displayed as you try to save it. This will also occur if you try to set a condition on a variable of the wrong type.


Disabling Breakpoints


To disable a breakpoint, simply uncheck the check-box that appears to its left in the list of breakpoints. When a breakpoint is disabled, it is exactly the same as if it had been deleted, except that you can enable it again at a later time, if you choose.


Topic 108289, last updated on 18-Apr-2020