ASA SQL User's Guide
Debugging Logic in the Database
Introduction to debugging in the database
You can carry out many tasks with the debugger, including the following:
Debug procedures and triggers You can debug SQL stored procedures and 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 through the source code of SQL procedures. You can also browser the source code of installed Java classes as long as the code for those classes is available on your disk.
Debug Java classes You can debug Java classes that are stored in the database.
Trace execution Step line by line through the code of a stored procedure or Java class running in the database. 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. You can also stop whenever a particular exception is thrown in a Java application.
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.