Tuesday, January 28, 2014

Installing the debugger for pgAdmin on Windows

Software used:
  • Windows 7 64-bit
  • PostgreSQL 9.3 installed from EnterpriseDB installer
  • pgAdmin III 1.18

1. Open c:\program files\postgresql\9.3\data\postgresql.conf
2. Un-comment or add this line:

shared_preload_libraries = '$libdir/plugin_debugger.dll'

3. Restart PostgreSQL server
4. In the database you want to debug, run create extension pldbgapi;
5. Restart pgAdmin III
6. In pgAdmin III, you should now have a Debugging option on context menus for user-defined functions/procedures. You can't debug PL/SQL or PL/V8 language functions, only PL/pgSQL with this debugger.