Re: Has anyone tried out the PL/pgSQL debugger?

From: "korry(dot)douglas" <korry(dot)douglas(at)enterprisedb(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Has anyone tried out the PL/pgSQL debugger?
Date: 2007-09-04 15:31:05
Message-ID: 46DD7A39.9050505@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> 1. can be integrated into psql?
>
There is an API - I wouldn't want to try to use it from the
command-line, but you certainly can. You would call functions such as:
SELECT * FROM pldbg_set_breakpoint( 'myfunction' );
SELECT * FROM pldbg_wait_for_breakpoint( ... );
SELECT * FROM pldbg_step_into( ... );
SELECT * FROM pldbg_continue( .. .);
....
Since it is driven by an API, you can code up a user interface in
whatever language/environment you like.
> 2. can be started from query execution (with breakpoint). Now I have
> to expliciltly start debugged function.
>
I'm not quite sure what you mean there. The debugger works in two
different modes:

1) In-context debugging: you set a breakpoint on a function (from
within a tool like pgAdmin) and then invoke that function from some
other client application

2) Direct debugging: you set a breakpoint on a function and the
debugger invokes that function on your behalf.

In pgAdmin, you start an in-context debugging by choosing the "Set
Breakpoint" (or perhaps "Set Global Breakpoint") option and you start a
direct debugging session by choosing the "Debug Function" option (sorry,
I don't have a copy of pgAdmin in front of me so I may have the spelling
wrong in there somewhere).

-- Korry

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2007-09-04 15:32:47 Re: Has anyone tried out the PL/pgSQL debugger?
Previous Message Dave Page 2007-09-04 15:26:42 Re: Has anyone tried out the PL/pgSQL debugger?