From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | korry(dot)douglas <korry(dot)douglas(at)enterprisedb(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:33:31 |
Message-ID: | 162867790709040833k40280abek63e8a00f2173dd89@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2007/9/4, korry.douglas <korry(dot)douglas(at)enterprisedb(dot)com>:
>
>
>
> 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.
I tested it without success. I didn't find documentation. There is
some startup sequence, so pldbg functions raised errors.
>
> 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
I mean method 1. I hadn't success with pgAdmin. Breakpoints was ignored.
>
> 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
>
I'll test it again in new beta pgAdmin
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Tilly | 2007-09-04 15:38:28 | Re: tsearch filenames unlikes special symbols and numbers |
Previous Message | Josh Berkus | 2007-09-04 15:32:47 | Re: Has anyone tried out the PL/pgSQL debugger? |