You can call the stored procedure from Interactive SQL (DBISQL), and see its execution interrupted at the breakpoint.
Calling the procedure from Interactive SQL
Start Interactive SQL. Connect to the sample
database with a user ID of DBA
and
a password of SQL
.
The connection appears in the debugger Connections window list.
Enter the following command in Interactive SQL to call the procedure using the customer with ID 122:
CALL sp_customer_products( 122 )
The query does not complete. Instead, execution is stopped in the debugger at the breakpoint. In Interactive SQL, the Interrupt the SQL Statement button is active. In the debugger Source window, the red arrow indicates the current line.
Step to the next line by choosing Run > Step Over. You can also press F7.
For longer procedures, you can use other methods of stepping through code. For more examples, see “Tutorial 3: Debugging a Java class”.
For the next lesson, leave the debugger stopped at the SELECT line.