debugging in pgadmin

Started by josep porresabout 17 years ago21 messagesgeneral
Jump to latest
#1josep porres
jmporres@gmail.com

Hi all

A lot of time since the last debugging activity.
I don't remember how to debug. I thought I had to set a breaking point in
the function i want to debug,
and then call that function.
I'm doing this, and from another query window, i call the function. But it
returns me the result, but it doesn't stop inside the function in order to
debug it.
What am i doing wrong?

thx

Josep

#2Glyn Astill
glynastill@yahoo.co.uk
In reply to: josep porres (#1)
Re: debugging in pgadmin
--- On Mon, 23/3/09, josep porres <jmporres@gmail.com> wrote:

A lot of time since the last debugging activity.
I don't remember how to debug. I thought I had to set a
breaking point in
the function i want to debug,
and then call that function.
I'm doing this, and from another query window, i call
the function. But it
returns me the result, but it doesn't stop inside the
function in order to
debug it.
What am i doing wrong?

Perhaps you've not got the pldebugger contrib module installed and run the sql script to create the debug functions?

#3josep porres
jmporres@gmail.com
In reply to: Glyn Astill (#2)
Re: debugging in pgadmin

mmm... my database schema have the pldbg functions.

2009/3/23 Glyn Astill <glynastill@yahoo.co.uk>

Show quoted text
--- On Mon, 23/3/09, josep porres <jmporres@gmail.com> wrote:

A lot of time since the last debugging activity.
I don't remember how to debug. I thought I had to set a
breaking point in
the function i want to debug,
and then call that function.
I'm doing this, and from another query window, i call
the function. But it
returns me the result, but it doesn't stop inside the
function in order to
debug it.
What am i doing wrong?

Perhaps you've not got the pldebugger contrib module installed and run the
sql script to create the debug functions?

#4Dave Page
dpage@pgadmin.org
In reply to: josep porres (#3)
Re: debugging in pgadmin

On Mon, Mar 23, 2009 at 12:40 PM, josep porres <jmporres@gmail.com> wrote:

mmm...  my database schema have the pldbg functions.

Do you have something like this in your postgresql.conf:

shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'

?

If not, add it, and restart the server (if you're on Windows, use
plugin_debugger.dll)

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#5josep porres
jmporres@gmail.com
In reply to: Dave Page (#4)
Re: debugging in pgadmin

yes, i have:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll' #
(change requires restart)

2009/3/23 Dave Page <dpage@pgadmin.org>

Show quoted text

On Mon, Mar 23, 2009 at 12:40 PM, josep porres <jmporres@gmail.com> wrote:

mmm... my database schema have the pldbg functions.

Do you have something like this in your postgresql.conf:

shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'

?

If not, add it, and restart the server (if you're on Windows, use
plugin_debugger.dll)

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#6josep porres
jmporres@gmail.com
In reply to: josep porres (#5)
Re: debugging in pgadmin

it is Postgres Plus 8.3

Postgres 8.3.4 build 1400

2009/3/23 josep porres <jmporres@gmail.com>

Show quoted text

yes, i have:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll' #
(change requires restart)

2009/3/23 Dave Page <dpage@pgadmin.org>

On Mon, Mar 23, 2009 at 12:40 PM, josep porres <jmporres@gmail.com> wrote:

mmm... my database schema have the pldbg functions.

Do you have something like this in your postgresql.conf:

shared_preload_libraries = '$libdir/plugins/plugin_debugger.so'

?

If not, add it, and restart the server (if you're on Windows, use
plugin_debugger.dll)

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#7Dave Page
dpage@pgadmin.org
In reply to: josep porres (#5)
Re: debugging in pgadmin

On Mon, Mar 23, 2009 at 12:50 PM, josep porres <jmporres@gmail.com> wrote:

yes, i have:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'        #
(change requires restart)

Whats the output from:

select * from pldbg_get_proxy_info();

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#8josep porres
jmporres@gmail.com
In reply to: Dave Page (#7)
Re: debugging in pgadmin

"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)",80300,3,4220

2009/3/23 Dave Page <dpage@pgadmin.org>

Show quoted text

On Mon, Mar 23, 2009 at 12:50 PM, josep porres <jmporres@gmail.com> wrote:

yes, i have:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll' #
(change requires restart)

Whats the output from:

select * from pldbg_get_proxy_info();

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#9Dave Page
dpage@pgadmin.org
In reply to: josep porres (#8)
Re: debugging in pgadmin

On Mon, Mar 23, 2009 at 1:07 PM, josep porres <jmporres@gmail.com> wrote:

"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)",80300,3,4220

That should work, despite the mismatch in build envs (ignore the devel
bit - that just tells us what version of Postgres the plugin was
compiled against).

What happens if you right-click a function in pgAdmin and select the
Debug option (not the Set Breakpoint option)? If that doesn't work,
can you please set the pgAdmin log level to debug, retry the test and
then send the log over?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#10josep porres
jmporres@gmail.com
In reply to: Dave Page (#9)
Re: debugging in pgadmin

that way I can debug =)

i attach the pgadmin.log zipped

2009/3/23 Dave Page <dpage@pgadmin.org>

Show quoted text

On Mon, Mar 23, 2009 at 1:07 PM, josep porres <jmporres@gmail.com> wrote:

"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)

3.4.2

(mingw-special)",80300,3,4220

That should work, despite the mismatch in build envs (ignore the devel
bit - that just tells us what version of Postgres the plugin was
compiled against).

What happens if you right-click a function in pgAdmin and select the
Debug option (not the Set Breakpoint option)? If that doesn't work,
can you please set the pgAdmin log level to debug, retry the test and
then send the log over?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Attachments:

pgadmin.zipapplication/zip; name=pgadmin.zipDownload
#11Dave Page
dpage@pgadmin.org
In reply to: josep porres (#10)
Re: debugging in pgadmin

On Mon, Mar 23, 2009 at 1:41 PM, josep porres <jmporres@gmail.com> wrote:

that way I can debug =)

OK, so in that case can I get a log of an attempt to set a global
breakpoint please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#12josep porres
jmporres@gmail.com
In reply to: Dave Page (#11)
Re: debugging in pgadmin

in the previous action, first of all I made a breakpoint and called the
function from a query window.
nothing happened, the only thing i got: the result.
All actions are in the previous log.

Is it what you want?

2009/3/23 Dave Page <dpage@pgadmin.org>

Show quoted text

On Mon, Mar 23, 2009 at 1:41 PM, josep porres <jmporres@gmail.com> wrote:

that way I can debug =)

OK, so in that case can I get a log of an attempt to set a global
breakpoint please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#13josep porres
jmporres@gmail.com
In reply to: josep porres (#12)
Re: debugging in pgadmin

well, now a log with only trying to debug setting a breakpoint

2009/3/23 josep porres <jmporres@gmail.com>

Show quoted text

in the previous action, first of all I made a breakpoint and called the
function from a query window.
nothing happened, the only thing i got: the result.
All actions are in the previous log.

Is it what you want?

2009/3/23 Dave Page <dpage@pgadmin.org>

On Mon, Mar 23, 2009 at 1:41 PM, josep porres <jmporres@gmail.com> wrote:

that way I can debug =)

OK, so in that case can I get a log of an attempt to set a global
breakpoint please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Attachments:

pgadmin.zipapplication/zip; name=pgadmin.zipDownload
#14Dave Page
dpage@pgadmin.org
In reply to: josep porres (#13)
Re: debugging in pgadmin

On Mon, Mar 23, 2009 at 1:56 PM, josep porres <jmporres@gmail.com> wrote:

well, now a log with only trying to debug setting a breakpoint

Hmmm - do you still have the demo schema on that server? Can you try
setting a breakpoint on the list_emp() function, and then calling it
please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#15josep porres
jmporres@gmail.com
In reply to: Dave Page (#14)
Re: debugging in pgadmin

good morning,

I have a demo database, but it's empty.
if you tell me where is the creation script, I will try it

2009/3/23 Dave Page <dpage@pgadmin.org>

Show quoted text

On Mon, Mar 23, 2009 at 1:56 PM, josep porres <jmporres@gmail.com> wrote:

well, now a log with only trying to debug setting a breakpoint

Hmmm - do you still have the demo schema on that server? Can you try
setting a breakpoint on the list_emp() function, and then calling it
please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#16josep porres
jmporres@gmail.com
In reply to: josep porres (#15)
Re: debugging in pgadmin

Ooops, I haven't realized the second schema, I've found the function.
Here you are your test log.

2009/3/24 josep porres <jmporres@gmail.com>

Show quoted text

good morning,

I have a demo database, but it's empty.
if you tell me where is the creation script, I will try it

2009/3/23 Dave Page <dpage@pgadmin.org>

On Mon, Mar 23, 2009 at 1:56 PM, josep porres <jmporres@gmail.com> wrote:

well, now a log with only trying to debug setting a breakpoint

Hmmm - do you still have the demo schema on that server? Can you try
setting a breakpoint on the list_emp() function, and then calling it
please?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Attachments:

pgadmin.zipapplication/zip; name=pgadmin.zipDownload
#17Dave Page
dpage@pgadmin.org
In reply to: josep porres (#16)
Re: debugging in pgadmin

On Tue, Mar 24, 2009 at 7:50 AM, josep porres <jmporres@gmail.com> wrote:

Ooops,   I haven't realized the second schema, I've found the function.
Here you are your test log.

OK, I think we've tracked down the problem. Can I send you some
updated DLLs to try offlist?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#18josep porres
jmporres@gmail.com
In reply to: Dave Page (#17)
Re: debugging in pgadmin

i've just upgraded the server to 8.3.7 holding the same data directory

select * from pldbg_get_proxy_info();
"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)",80300,3,2948

is it ok for testing your dll's?

2009/3/24 Dave Page <dpage@pgadmin.org>

Show quoted text

On Tue, Mar 24, 2009 at 7:50 AM, josep porres <jmporres@gmail.com> wrote:

Ooops, I haven't realized the second schema, I've found the function.
Here you are your test log.

OK, I think we've tracked down the problem. Can I send you some
updated DLLs to try offlist?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#19josep porres
jmporres@gmail.com
In reply to: josep porres (#18)
Re: debugging in pgadmin

by the way, after upgrading, i get the same behaviour
even executing the function in a query window created after setting the
breakpoint.

2009/3/24 josep porres <jmporres@gmail.com>

Show quoted text

i've just upgraded the server to 8.3.7 holding the same data directory

select * from pldbg_get_proxy_info();
"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)",80300,3,2948

is it ok for testing your dll's?

2009/3/24 Dave Page <dpage@pgadmin.org>

On Tue, Mar 24, 2009 at 7:50 AM, josep porres <jmporres@gmail.com> wrote:

Ooops, I haven't realized the second schema, I've found the function.
Here you are your test log.

OK, I think we've tracked down the problem. Can I send you some
updated DLLs to try offlist?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#20Dave Page
dpage@pgadmin.org
In reply to: josep porres (#18)
Re: debugging in pgadmin

On Tue, Mar 24, 2009 at 1:42 PM, josep porres <jmporres@gmail.com> wrote:

i've just upgraded the server to 8.3.7 holding the same data directory

select * from pldbg_get_proxy_info();
"serverversionstr","serverversionnum","proxyapiver","serverprocessid"
"PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)",80300,3,2948

is it ok for testing your dll's?

Yes. I'll sent them offlist if that's OK?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

#21berdam
berdamzinho@yahoo.com.br
In reply to: josep porres (#16)