Proceed with debugging once breakpoints have been set for a procedural object in the Database Development perspective.
Execution of a procedural object in the Database Debug perspective differs from exeuction in Run mode in that execution can be suspended and resumed with breakpoints, and the procedural object variables and expressions can be observed and evaluated.
There can be one active connection to SQL Anywhere and Sybase IQ during a debug session. Disconnect other SQL Anywhere or Sybase IQ connection profiles before debugging.
You can use the Debug view toolbar during a debug session to resume, suspend, or terminate execution of a procedural object. There are several ways to suspend or terminate execution of a procedural object during debugging. Use the one appropriate to your situation.
Similar to a launch configuration, a Database Debug session remembers the SQL statement each time you want to test your object. In addition, it allows you to examine and manipulate variables and parameters and execute procedural objects one breakpoint at a time.
Use one of three methods to launch a session: from the Database Development perspective, from the Eclipse toolbar, or from the procedural object's editor.
You can set breakpoints by double-clicking the left vertical ruler in SQL File Editor or the procedural object editor's Source page, or by right-clicking the left vertical ruler and selecting Toggle Breakpoint. The Toggle breakpoint can also be used for setting the breakpoint. If the line is not appropriate for a breakpoint, the marker (a blue dot) automatically adjusts to the next appropriate line in the code. You can remove breakpoints by double-clicking or right-clicking the marker and selecting Toggle Breakpoint.
After you set the breakpoints, the Debug command switches the perspective to the Database Debug perspective and suspends execution at the first breakpoint. While switching the perspective, click OK on the dialog that appears to confirm the perspective switch.
During debugging, use the appropriate toolbar buttons to step into or over a line of code.
Use the Variables view to track the variables in the expressions that the debugger has evaluated.
To change the value of a variable, right-click the value in the Variables view, and choose Change Value from the context menu. The Set Value dialog appears. Enter a new value for the variable and click OK.
Use the Referenced Tables view to examine data in tables and views referenced in the procedural object, and open the Table Data Editor to edit tables.
Examine and edit tables referenced in the object you are debugging.
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.