I followed the installation notes C:\Program Files\PostgreSQL\9.2\doc\installation-notes.html
shared_preload_libraries = '$libdir/plugin_debugger.dll'
CREATE EXTENSION pldbgapi;
which returned with success.But when I right-click on a function in the TreeView of pgAdmin, there's no debug option and the debugging option is grayed out on the Tools menu.
pl/pgsql Debugger
The package includes EnterpriseDB's pl/pgsql debugger plugin which may be used by the debugger UI in pgAdmin to help with development of your database functions. The debugger plugin is disabled by default for performance reasons. To enable it, follow the following steps: 1.Edit the postgresql.conf file in the data directory and modify the shared_preload_libraries config option to look like the following, if running on Linux or Mac: shared_preload_libraries = '$libdir/plugin_debugger.so' or if you are on Windows:
shared_preload_libraries = '$libdir/plugin_debugger.dll'2.Restart the PostgreSQL server.
3.Run CREATE EXTENSION pldbgapi; in the database you wish to debug using psql or the pgAdmin query tool.
link: https://www.pgadmin.org/docs/dev/debugger.html
The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as EDB-SPL functions, stored procedures and packages in EDB Postgres Advanced Server. The Debugger is available as an extension for your PostgreSQL installation, and is distributed as part of Advanced Server.
To set a breakpoint at the first line of a program, right-click the name of the object you would like to debug, and select Set breakpoint from the Debugging sub-menu. The debugger window will open, waiting for another session to invoke the program.
One has to go into the Server Configuration on the Tools menu and enable shared_preload_libraries
item by checking the checkbox next to it. Editing the configuration file and bouncing the database server alone don't enable the debugger in the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With