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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » The SQL Anywhere debugger » Breakpoints

 

Setting breakpoints

Administrators can set breakpoints in Sybase Central. A breakpoint instructs the debugger to interrupt execution at a specified line. By default, a breakpoint applies to all connections.

Prerequisites

You must have the SA_DEBUG system role.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. Click Mode » Debug.

  3. 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.

    Option Action
    Sybase Central right pane
    1. In the left pane, double-click Procedures & Functions and select a procedure.

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

      A cursor appears in the line where you clicked.

    3. Press F9.

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

    Debug menu
    1. Click Debug » Breakpoints.

    2. Click New.

    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.

      The count is the 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.

Results

The breakpoint is set.

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'