Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Feature Request]: Integrate PL/pgSQL Debugger (pldebugger) with GUI similar to pgAdmin/DBeaver

Abierto
#243 3 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
postgresql, vscode

Línea de trabajo

Comienza revisando el flujo de trabajo existente de vscode-pgsql y los requisitos previos de pldebugger descritos en el issue: instalación del servidor, shared_preload_libraries, detección de reinicios y creación de pldbgapi. Define el alcance de la implementación antes de programar, ya que la solicitud abarca tanto la automatización de la configuración como una interfaz de depuración completa de VS Code. La finalización debe incluir la gestión verificada de los requisitos previos y la funcionalidad de puntos de interrupción, ejecución paso a paso, variables, pila de llamadas, parámetros, salida y watch.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Feature Description

Currently, the vscode-pgsql extension is excellent for query execution, schema browsing, and visualization. However, when it comes to debugging stored procedures and functions written in PL/pgSQL, developers have to switch to external tools like pgAdmin or DBeaver.
The current workflow for debugging in VS Code is non-existent. Debugging server-side logic requires a separate, heavy IDE, which breaks the development flow. Developers want to set breakpoints, step into functions, and inspect variables directly inside VS Code without leaving the editor.

Proposed Capabilities

I propose the integration of the pldebugger extension into the vscode-pgsql workflow, accompanied by a native graphical interface.
The implementation should automate or simplify the following setup steps that are currently manual.

  1. OS-Level Package Installation: First, the pldebugger shared library must be installed on the PostgreSQL server machine. The installation method varies significantly by operating system:
  • Ubuntu/Debian: sudo apt install postgresql-<version>-pldebugger (e.g., postgresql-16-pldebugger)
  • RHEL/Rocky/AlmaLinux: sudo dnf install pldebugger_<version> (e.g., pldebugger_16)
  • Windows: the debugger library (plugin_debugger.dll) is bundled with the EnterpriseDB (EDB) PostgreSQL distribution, typically located in: C:\Program Files\PostgreSQL\<version>\lib\plugin_debugger.dll. If using the EDB installer, no additional OS-level installation is required - the library is present by default.
  1. PostgreSQL Server Configuration (shared_preload_libraries):
    The debugger library must be loaded at server startup. It cannot be added dynamically.
    Required setting in postgresql.conf.
  • Check current setting by executing SHOW shared_preload_libraries;
  • Detect the operating system and suggest the correct library path
  • If plugin_debugger is not present:
    • Show a warning notification with platform-specific instructions
    • Provide the correct postgresql.conf location for the detected OS
    • Include the exact line to add to the configuration file
    • Guide the user to restart PostgreSQL after configuration changes
    • Provide a "Check Again" button after the user confirms the restart
  • Server restart detection: Implement a way to detect if the server has been restarted after config changes (e.g., compare pg_postmaster_start_time before and after)
  1. Database Extension Creation
    After the server restart, the debugger API must be enabled in the target database: CREATE EXTENSION pldbgapi;
    Extension Behavior:
  • Check if the extension already exists: SELECT * FROM pg_extension WHERE extname = 'pldbgapi';
  • If missing, display a prompt: "Debugger API is not installed in this database. Install now?"
  • Provide an "Install" button that executes CREATE EXTENSION pldbgapi; in the current connection.
  • Show a confirmation upon successful installation.

4. GUI Debugger Interface
Once all prerequisites are satisfied, provide a visual debugger within VS Code:

  • Breakpoints: Set/remove breakpoints in .sql or .pgsql files, or directly in the function body editor.
  • Debug Controls: Step Over, Step Into, Step Out, Continue, Stop.
  • Variables Panel: Inspect local variables, parameters, and their values during execution.
  • Call Stack: Show the current execution stack with navigation.
  • Parameter Input: When debugging a function, prompt the user to enter parameter values (types, defaults, etc.).
  • Output Panel: Display debug output, errors, and execution logs.
  • Watch Expressions: Allow users to add custom expressions to monitor

The debugging experience should match the native VS Code Debugger UI (similar to Python, Node.js, or C# extensions), with a dedicated debug view and seamless integration.

Alternatives
  • pgAdmin: While it has a functional debugger, it requires running a separate desktop application and a browser. It lacks the tight integration with the code editor that VS Code provides.
  • DBeaver: Similar to pgAdmin, it is an external tool. It also relies on the same underlying pldebugger extension but offers a less modern UI compared to VS Code's native debugging experience.
Conclusion

Adding PL/pgSQL debugging with a complete cross-platform setup assistant and graphical interface would significantly enhance vscode-pgsql, making it the ultimate PostgreSQL development tool within VS Code. The three-layer setup (OS package → server config → database extension) is non-trivial, but with proper automation and platform-specific guidance, it becomes accessible to all developers, regardless of their operating system or deployment environment.

Lenguaje dominante
Sin datos de lenguaje
Estrellas
398
Forks
32
Merge medio
1 d 1 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/vscode-pgsql

Todos los issues de microsoft/vscode-pgsql

Issues similares

Más issues de Databases

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.