Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the debugger plug-in not available for PostgreSQL 9.2 EnterpriseDB for Win7 x-64

I followed the installation notes C:\Program Files\PostgreSQL\9.2\doc\installation-notes.html

  1. Edited the postgresql.conf file shared_preload_libraries = '$libdir/plugin_debugger.dll'
  2. Stopped and Restarted the PostgreSQL service in pgAdmin
  3. Went into database and ran 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

like image 451
Tim Avatar asked Feb 05 '13 21:02

Tim


People also ask

Can we debug in PostgreSQL?

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.

How do you debug in Pgadmin?

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.


1 Answers

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.

like image 65
Tim Avatar answered Sep 18 '22 18:09

Tim