oliverriggs / pldebugger Goto Github PK
View Code? Open in Web Editor NEWThis project forked from enterprisedb/pldebugger
Procedural Language Debugger Plugin for PostgreSQL and EDB Postgres Advanced Server
This project forked from enterprisedb/pldebugger
Procedural Language Debugger Plugin for PostgreSQL and EDB Postgres Advanced Server
PostgreSQL pl/pgsql Debugger API ================================ This module is a set of shared libraries which implement an API for debugging pl/pgsql functions on PostgreSQL 8.4 and above. The pgAdmin project (http://www.pgadmin.org/) provides a client user interface as part of pgAdmin III v1.10.0 and above, and pgAdmin 4. If you wish to debug functions on PostgreSQL 8.4, 9.0 or 9.1, please checkout the PRE-9_2 branch from GIT. If you wish to debug functions on PostgreSQL 8.2 or 8.3, please checkout the PRE_8_4_SERVER branch from CVS. Installation ------------ - Copy this directory to contrib/ in your PostgreSQL source tree. - Run 'make; make install' - Edit your postgresql.conf file, and modify the shared_preload_libraries config option to look like: shared_preload_libraries = '$libdir/plugin_debugger' - Restart PostgreSQL for the new setting to take effect. - Run the following command in the database or databases that you wish to debug functions in: CREATE EXTENSION pldbgapi; (on server versions older than 9.1, you must instead run the pldbgapi--1.1.sql script directly using psql). Usage ----- Connect pgAdmin to the database containing the functions you wish to debug. Right-click the function to debug, and select Debugging->Debug to execute and debug the function immediately, or select Debugging->Set Global Breakpoint to set a breakpoint on the function. This will cause the debugger to wait for another session (such as a backend servicing a web app) to execute the function and allow you to debug in-context. For further information, please see the pgAdmin documentation. Troubleshooting --------------- The majority of problems we've encountered with the plugin are caused by failing to add (or incorrectly adding) the debugger plugin library to the shared_preload_libraries configuration directive in postgresql.conf (following which, the server *must* be restarted). This will prevent global breakpoints working on all platforms, and on some (notably Windows) may prevent the pldbgapi.sql script from executing correctly. Architecture ------------ The debugger consists of three parts: 1. The client. This is typically a GUI displays the source code, current stack frame, variables etc, and allows the user to set breakpoints and step throught the code. The client can reside on a different host than the database server. 2. The target backend. This is the backend that runs the code being debugged. The plugin_debugger.so library must be loaded into the target backend. 3. Debugging proxy. This is another backend process that the client is connected to. The API functions, pldbg_* in pldbgapi.so library, are run in this backend. The client is to connected to the debugging proxy using a regular libpq connection. When a debugging session is active, the proxy is connected to the target via a socket. The protocol between the proxy and the target backend is not visible to others, and is subject to change. The pldbg_* API functions form the public interface to the debugging facility. debugger client *------ libpq --------* Proxy backend (pgAdmin) * | pldebugger socket connection | * application client *----- libpq -------* Target backend Licence ------- The pl/pgsql debugger API is released under the Artistic Licence v2.0. https://opensource.org/licenses/artistic-license-2.0 Copyright (c) 2004-2022 EnterpriseDB Corporation. All Rights Reserved. Contact ------- For support, please email the pgAdmin support mailing list. See http://www.pgadmin.org/support/ for more details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.