Vikram
Vikram

Reputation: 387

PostgreSQL Debugger installation

I'd like to debug functions and tried many online articles but couldn't help myself in installing Debugger for PostgreSQL.

I'm using below version:

"PostgreSQL 9.6.1 on x86_64-pc-mingw64, compiled by gcc.exe (Rev5, Built by MSYS2 project) 4.9.2, 64-bit"

Can someone please assist me in installing Debugger for PostgreSQL?

Upvotes: 0

Views: 798

Answers (2)

mtahatavaci
mtahatavaci

Reputation: 1

I am using postgresql 12 and pgadmin4 in my Microsoft Server. I tried to change postgresql config file (line 676) like:

shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'

and then I restarted postgresql-x64-12 service and my server. But it didn't work out. Then I learned that I don't have to change the config file. I just need to create an extension on the database I need. Extension's name is "pldbgapi". I explained with the images below. You just need to create this extension and then right-click on your function and debug it.

Creating Extension (1)

Creating Extension (2)

Function Debuging

You can also create it with command line.

CREATE EXTENSION pldbgapi
SCHEMA public
VERSION "1.1";

Upvotes: 0

Laurenz Albe
Laurenz Albe

Reputation: 247445

Pull the latest source from https://git.postgresql.org/gitweb/?p=pldebugger.git and build it according to the instructions in the README.

You'll need a configured PostgreSQL source installation, but that shouldn't be a problem because you compiled PostgreSQL yourself, didn't you?

Here are the instructions and some remarks for building with MinGW on Windows.

Upvotes: 2

Related Questions