Introduction to the SQL Anywhere debugger

You can use the SQL Anywhere debugger during the development of SQL stored procedures, triggers, event handlers, and user-defined functions.

You can perform many tasks with the SQL Anywhere debugger, including:

  • Debug procedures and triggers   You can debug SQL stored procedures or triggers.

  • Debug event handlers   Event handlers are an extension of SQL stored procedures. The material in this chapter 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   When execution is stopped at a breakpoint in a SQL procedure, you can execute queries. This permits you to look at intermediate results held in temporary tables, as well as to check values in base tables and to view the query execution plan.

Tip

By default, SOAP connections time out after 60 seconds before they time out. You can specify -xs http(kto=0) so that the connection does not time out when you are trying to debug SOAP functions and procedures. See -xs server option.


Requirements for using the debugger