Debugging PL/SQL from Oracle Database Explorer

Note:

PL/SQL debugging in Visual Studio Code works with both on-premises and databases in Oracle Cloud. However, Oracle Autonomous Database is not currently supported.

When first using PL/SQL debugging, configure both the PL/SQL debugger and the database:

  1. In Oracle Database Explorer, right click on a connection name and select PL/SQL Debugger and Compiler Settings and set the IP address (or hostname) and port number range that will be used by the debugger (the Oracle Database will connect back to your machine using that IP address (or hostname) and one of the ports)

  2. A script to grant privileges and configure the database is provided in the same dialog. Copy the script and then right click on the connection node for the database and select Open New SQL File. Paste the script into the new file, modify it as needed, and then right click in the editor and select Execute All from the menu.

  3. The PL/SQL procedure/function/packages you wish to debug must be compiled with debug information: Right click on the procedure/function/package and select Compile Debug from the menu. The Oracle Explorer icons will change to alert you and also to remind you to issue a Compile when done debugging to restore them to their non-debug state.

  4. Right click on the procedure/function/package and select Open, or Open Package Body from the menu. Set breakpoints as desired (note: conditional breakpoints are not currently supported).

  5. To begin debugging, from the same menu select Step Into or Run Debug.

See Also:

Debugging PL/SQL with Visual Studio Code (and more), for a walkthrough showing how to use PL./SQL debugging.