Installation and Configuration of PostgreSQL Debugger Plugin on Debian Linux

Installation of the Plugin Program on PostgreSQL Server in Debian Linux

Execute the following command on the PostgreSQL database server running Debian system to install the plugin pldebugger:

sudo apt install postgresql-15-pldebugger
# After running this command, it seems that the pgsql service automatically restarted. According to the logs, it appears that there is no need to execute the restart command below; I executed the restart command at that time, but it can be tested again without executing the restart command below.
sudo service postgresql restart

Installing Extension on PostgreSQL Database Schema

After successful execution, log in to the PostgreSQL database using your account and execute:

CREATE EXTENSION pldbgapi;

This creates the corresponding plugin extension pldbgapi on the database instance (schema).

Configuration Notes for PostgreSQL Database Service

Note that when installing many other plugins, it is necessary to add shared preload libraries in the postgresql.conf configuration file. For example, for Citus, you need to add `shared_preload_libraries = ‘citus’`. However, for version 15 of PostgreSQL, pldebugger does not require this shared preload library, although earlier versions may require it.

Installation and Configuration of Debugger Plugin for Database Client Application DBeaver

Then upgrade DBeaver to version 42.3.0 or later, open<span>Help</span> -> ‘Install New Software’ menu, search for dbeaver debug, find the corresponding plugin, and install the DBeaver debugging plugin. If the previously configured DBeaver toolbar does not have the debug button, you need to open the ‘Window’ -> ‘Customize Perspective’ menu, check ‘debug’. The first time it may not be selectable, and it will prompt ‘<span>switch to action set availability'</span>, so first go to the action set availability section to check it, confirm and close it. Later, go back to customize perspective to see that it has been checked. After checking the debugging and configuration debugging, breakpoints, and other toolbars, you can configure debugging.

Leave a Comment