Learn more about Toad for SQL Server
at Dell Software

Find solutions and downloads at the
Toad for SQL Server Support Portal

Toad for SQL Server 6.6

You are here: Edit SQL > Debug SQL > Set Breakpoints

Set Breakpoints

Breakpoints are markers in your code where you want to stop execution during debugging without having to single-step to that location. You can create breakpoints using the Editor or the Breakpoints window.

To set a breakpoint from the Editor window

» Click the left margin of the Editor window to set a breakpoint. You can also click on the Debug toolbar.

To set a breakpoint from the Breakpoints window

  1. Select Debug | Windows | Breakpoints from the menu.

  2. Right-click anywhere in the window and select Add Breakpoint.

  3. Review the following for additional information:

    Line

    Enter the line number in the procedure where you want to set the breakpoint.

    Pass count

    Enter the number of times to execute a loop before setting a breakpoint. You can use a pass count with FOR loops, DO WHILE loops, IF/END IF, etc. In this case, the Debugger will NOT stop on the breakpoint line until just before the breakpoint line for the nth pass count.

    When combined with a condition expression, the script before pausing to verify whether any other conditions specified are true.

    Example:

    If you set the pass count to 5 and the condition expression to sum > 10, on the fifth execution of the script, Toad checks whether the sum is greater than 10; and if so, sets the breakpoint. If the sum is less than 10, a breakpoint is not set.

    Expression

    Enter a condition in which a breakpoint is set ONLY if the condition is met when running the code. The format of the condition is variable_operator_value, such as sum > 10. For a list of supported operators, see Supported Operators.

Tips:

 

Related Topics

About Debugging SQL

of