On Wed, Mar 12, 2008 at 7:21 AM, James Mansion <[EMAIL PROTECTED]> wrote: > Are there any hints and tips anywhere on practical issues for testing > and debugging changes to a backend? > > (eg how to run it up and feed it SQL ideally without running a > postmaster and execing a back end) > > I'm using VS2008 on XP by choice, and I'd like to investigate supporting > something closely related to > the Firebird 2.1 trigger on transaction commmit and rollback.
I've yet to try 2008, but 2005 works beautifully when debugging the server - even stepping into non-core code is simple (I spent some time in the plpgsql debugger plugin for example). The hard part can be attaching the debugger to the appropriate backend. You can either introduce a startup delay (there's a backend command line option for that iirc), or if you want to break at a specific point, I sometimes add a loop to the code along the lines of: int x=0; while (!x) Sleep(100); When the backend hits that point, attach the debugger, break execution, and set x to a value in the locals window. Then you can step through the code from that point. -- Dave Page EnterpriseDB UK Ltd: http://www.enterprisedb.com PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers