0

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?

1

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm complete new to Postgres. How do I access /contrib in windows? and copy the directory to this location.
Oh, I thought you'd built it yourself. Where did you get MinGW binaries?
0

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";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.