Contents Index Editing breakpoint conditions Working with connections

ASA SQL User's Guide
  Debugging Logic in the Database

Working with variables


The debugger lets you view and edit the behavior of your variables while stepping through your code. The debugger provides a Debugger Details window to display the different kinds of variables used in stored procedures and Java classes. The Debugger Details windows appear at the bottom of the Sybase Central window when Sybase Central is running the Debug task.

Local variables 

To watch the values of your variables

  1. Set a breakpoint in the procedure whose variables you wish to examine.

    For information on setting breakpoints, see Setting breakpoints.

  2. Click the Local tab on the Variables pane of the Debugger Details.

  3. Run the procedure. The variables, along with their values, appear in the Local tab.

Other variables 

Global variables are defined by Adaptive Server Anywhere and hold information about the current connection, database, and other settings. They are displayed on the Globals tab of the Variables window.

For a list of global variables, see Global variables.

Row variables are used to hold the values used in triggers. They are displayed on the Row tab of the Variables window.

For more information on triggers, see Introduction to triggers.

Static variables are used in Java classes. They are displayed in the Statics tab.

The call stack 

It is useful to examine the sequence of calls that has been made when you are debugging nested procedures or Java classes. You can view a listing of the procedures in the Call Stack tab.

To display the call stack

  1. Set a breakpoint in the procedure whose variables you wish to examine.

  2. Run the code to the breakpoint.

    The names of the procedures appear in the Calls Stack tab. The current procedure is shown at the top of the list. The procedure that called it is immediately below, and so on.


Contents Index Editing breakpoint conditions Working with connections