The SQL Anywhere debugger

You can use the SQL Anywhere debugger to debug SQL stored procedures, triggers, event handlers, and user-defined functions you create.

You can also use the debugger to:

  • Debug event handlers   Event handlers are an extension of SQL stored procedures. The material in this section about debugging stored procedures applies equally to debugging event handlers.

  • Browse stored procedures and classes   You can browse the source code of SQL procedures.

  • Trace execution   Step line by line through the code of a stored procedure. You can also look up and down the stack of functions that have been called.

  • Set breakpoints   Run the code until you hit a breakpoint, and stop at that point in the code.

  • Set break conditions   Breakpoints include lines of code, but you can also specify conditions when the code is to break. For example, you can stop at a line the tenth time it is executed, or only if a variable has a particular value.

  • Inspect and modify local variables   When execution is stopped at a breakpoint, you can inspect the values of local variables and alter their value.

  • Inspect and break on expressions   When execution is stopped at a breakpoint, you can inspect the value of a wide variety of expressions.

  • Inspect and modify row variables   Row variables are the OLD and NEW values of row-level triggers. You can inspect and modify these values.

  • Execute queries   You can execute queries when execution is stopped at a breakpoint in a SQL procedure. This permits you to look at intermediate results held in temporary tables, check values in base tables, and to view the query execution plan.


Requirements for using the debugger
Tutorial: Getting started with the debugger
Breakpoints
Variables
Connection debugging