Local and remote debugging
The debugger's client/server design allows you to debug stored procedures that are running remotely on other systems in a network, as well as stored procedures running locally on your workstation. The debugger server, also known as a debug engine, runs on the same system as the stored procedure you want to debug. This system can be your workstation or a system accessible through a network. If you debug a stored procedure running on your workstation, you are performing local debugging. If you debug a stored procedure running on a system accessible through a network connection, you are performing remote debugging.
Remote debugging allows you to run the stored procedure on one system and control it from your workstation. The local system runs the debugger user interface, and the remote system runs both the debug engine and your stored procedure. To be able to debug remotely, you need access to the remote machine where the database and routine you are debugging resides.
When you start the debugger for debugging, you specify the URL of the database (according to the JDBC) and the database driver class. To debug remotely, you simply specify the JDBC URL of the remote machine (for example, jdbc:db2://<hostname>/database name rather than jdbc:db2:/database name) and you specify a remote database driver class (for example, COM.ibm.db2.jdbc.net.DB2Driver). For further information about starting the debugger, see the related topic below.
When debugging remotely, you may need to configure a rule to turn off your personal firewall. Some corporations have firewalls that might not allow you to connect to an offsite machine. To determine if there are any actions you can take to connect to the remote machine, contact your site administrator
Why Use Remote Debugging?
Remote debugging can prove useful in any number of situations, such as:
- The stored procedure you are debugging may be running on another system and might behave differently on that system than on your own. You can use the remote debug feature to debug this stored procedure on the (other) remote system from your local system. The user on the system running that stored procedure interacts with the stored procedure as usual (except where breakpoints or step commands introduce delays), and you are able to control the stored procedure and observe the remote stored procedure's internal behavior from your local system. Remote debugging looks and acts like local debugging, except for possible network delays.
- The stored procedure you are debugging might have been compiled for a platform where the debugger UI will not run. You can use the remote debugging feature to take advantage of the debugger UI on your local machine while debugging the stored procedure running on the remote machine.
Related tasks
Using the stored procedure debug launch configuration