Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - SQL Usage » Stored Procedures and Triggers » Debugging procedures, functions, triggers, and events » Working with breakpoints


Setting breakpoints

A breakpoint instructs the debugger to interrupt execution at a specified line. By default, a breakpoint applies to all connections.

To set a breakpoint

  1. Connect to the database as a user with DBA authority.

  2. In the left pane, double-click Procedures & Functions.

  3. Select a procedure.

  4. Choose Mode » Debug.

  5. In the Which User Would You Like To Debug field, type * to debug all users, or type the name of the database user you want to debug.

  6. In the right pane, click the line where you want to insert the breakpoint.

    A cursor appears in the line where you clicked

  7. Press F9.

    A red circle appears to the left of the line of code.

To set a breakpoint (Debug menu)

  1. Choose Debug » Breakpoints.

    The Breakpoints window appears.

  2. Click New.

    The New Breakpoint window appears.

  3. In the Procedure list, select a procedure.

  4. If required, complete the Condition and Count fields.

    The Condition is a SQL expression that must evaluate to true for the breakpoint to interrupt execution. For example, you can set a breakpoint to apply to a connection made by a specified user, by entering the following condition:

    CURRENT USER = 'user-name'

    The Count is a number of times the breakpoint is hit before it stops execution. A value of 0 means that the breakpoint always stops execution.

  5. Click OK. The breakpoint is set on the first executable statement in the procedure.