Skip to content

cvas71/idea-plpgdebugger

 
 

Repository files navigation

Intellij PL/pg SQL debugger

Build Version Downloads

Debug PL/pg SQL with Intellij Database Tools

Features

  • Debug queries from editor
  • Debug routines and triggers from database explorer
  • Full support for variables inspection with Docker custom debugger

Submit features => Production ready task list
Report a bug or a problem => Create an issue

Use the enhanced debugger in a Docker container

Try out the Docker image with the ready to use enhanced debugger (versions 11 to 14).

docker run -p 5514:5432 --name PG14-debug -e POSTGRES_PASSWORD=postgres -d galien0xffffff/postgres-debugger:14

Run this script on your database

CREATE EXTENSION if not exists pldbgapi;

To build your own image instructions are here

Debug a routine from the editor

Just write a statement using the function you want to debug

SELECT function_name(args)

Debug a routine from the database explorer

Choose Debug routine action in the database tree and run it in a console

Variable inspection

(Composite types are not returned by the extension see Limitation)

  • Basic variables
  • Arrays(including array of composite)

Inline values

Arguments and variables are displayed in code, it can be disabled in the plugin configuration.

Debug process

The debugger activity is visible as a background process in the IDE

Limitation

The standard pldbgapi does not send back composite variable, but you can put it in arrays to inspect them.
A modified extension is available in this repo, hope this can be integrated in the official extension soon.
At the moment indirect debugging is not supported but will be available soon.

Installation

Server

You must first install the debugger extension and activate the shared library onto the server.
Follow these instructions for PgAdmin

IDE

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "idea-plpgdebugger" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.

About

A plugin to debug PL/pg in Intellij

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 97.6%
  • PLpgSQL 1.2%
  • Dockerfile 1.1%
  • Shell 0.1%