Using Database Debug

Database Development offers a complete set of views for debugging procedural objects. You can set breakpoints by double-clicking the left vertical ruler in SQL Editor, 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.

There are several steps in debugging your code:

  1. Manipulating Breakpoints

  2. Launching a Database Debug Session

  3. Debugging Procedural Objects

  4. Viewing Referenced Tables While Debugging

After you set the breakpoints, begin debugging via the SQL Editor context menu option Debug, which automatically switches the perspective to Database Debug and suspends execution at the first breakpoint. While switching the perspective, click OK on the dialog that appears to confirm the perspective switch.

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.

IconActionDescription
SuspendSuspends execution between breakpoints or before the debug operation reaches the end of the procedure.
TerminateTerminates execution of the procedural object.
DisconnectDisconnects a client debugger from a remote debug target. See Debugging an External Client.
Remove all terminated launchesClears all terminated debug targets from the SQL Editor.
ResumeResumes a suspended thread.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com