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 code listing.
You can also set much more sophisticated breakpoints on either or both of the following criteria :
•A source code line.
•A variable reaching a given value.
If you wish to add conditions dependent on the variables values you must use the Breakpoints Editor.
To bring it up, you can do either of the following :
•Click on either the Add or Modify buttons at the right of the list of breakpoints.
•Right-click in the gutter of the code editor. A popup menu appears; select Add or Modify from it.
Use the Code Line and/or the Variable Value check boxes to set the corresponding breakpoint option.
•You can set both, in which case a breakpoint would be triggered 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, Q++Studio will save the line number, 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 Variable combo box features incremental search, which means that you can type the first letters of a variable name and the closest match will be displayed.
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.
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.
If the line you select for a breakpoint contains no executable instructions, Q++Studio will issue an error as you try to save it. This will also occur if you try to set a condition on a variable of the wrong type.
Finally, note that breakpoints are personal to each user, even though Macros are shared by all users.