Re: Has anyone tried out the PL/pgSQL debugger?
От | korry.douglas |
---|---|
Тема | Re: Has anyone tried out the PL/pgSQL debugger? |
Дата | |
Msg-id | 46DD7A39.9050505@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Has anyone tried out the PL/pgSQL debugger? ("Pavel Stehule" <pavel.stehule@gmail.com>) |
Ответы |
Re: Has anyone tried out the PL/pgSQL debugger?
|
Список | pgsql-hackers |
<br /><blockquote cite="mid:162867790709040815h744b8151u170a1fe97642c724@mail.gmail.com" type="cite"><pre wrap="">1. canbe integrated into psql? </pre></blockquote> 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:<br /><tt> SELECT * FROM pldbg_set_breakpoint( 'myfunction');<br /> SELECT * FROM pldbg_wait_for_breakpoint( ... );<br /> SELECT * FROM pldbg_step_into( ... );<br/> SELECT * FROM pldbg_continue( .. .);<br /> ....</tt><br /> Since it is driven by an API, you can codeup a user interface in whatever language/environment you like.<br /><blockquote cite="mid:162867790709040815h744b8151u170a1fe97642c724@mail.gmail.com"type="cite"><pre wrap="">2. can be started from queryexecution (with breakpoint). Now I have to expliciltly start debugged function. </pre></blockquote> I'm not quite sure what you mean there. The debugger works intwo different modes:<br /><br /><blockquote>1) In-context debugging: you set a breakpoint on a function (from within atool like pgAdmin) and then invoke that function from some other client application<br /></blockquote><blockquote> 2) Directdebugging: you set a breakpoint on a function and the debugger invokes that function on your behalf.<br /><br /></blockquote>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 havea copy of pgAdmin in front of me so I may have the spelling wrong in there somewhere).<br /><br /> -- Korry<br/>
В списке pgsql-hackers по дате отправления: