Thread: pgadmin debug on windows
Hello,
I've installed on a windows xp machine beta 1 of postgresql 8.3 and pgadmin III 1.8.
I've loaded a backup of a database from a 8.2.5 machine, for testing purpose, and tried
the new functionality of plpgsql debug of functions.
But I was disappointed to see that does not work.
I try to debug right clicking on a function (very basic function indeed)
and choosing debug->debug from the contextual menu, but what I obtain is
"an unhandled exception occurred." and Abort/Retry/Ignore buttons. Same if I try to set breakpoint
(i can see the debug window this way, but completely empty)
Sorry I cannot give more details, but I don't have them myself <g>
Can someone give me an idea of what's wrong? Is maybe debugging not yet available in this beta release
of postgresql on windows??? Or the problem is that the function is imported from a 8.2.5 database?
Thanks everyone.
Roberto Icardi wrote: > Hello, > > I've installed on a windows xp machine beta 1 of postgresql 8.3 and > pgadmin III 1.8. > I've loaded a backup of a database from a 8.2.5 machine, for testing > purpose, and tried > the new functionality of plpgsql debug of functions. > > But I was disappointed to see that does not work. > I try to debug right clicking on a function (very basic function indeed) > and choosing debug->debug from the contextual menu, but what I obtain is > "an unhandled exception occurred." and Abort/Retry/Ignore buttons. Same > if I try to set breakpoint > (i can see the debug window this way, but completely empty) > Sorry I cannot give more details, but I don't have them myself <g> > > Can someone give me an idea of what's wrong? Is maybe debugging not yet > available in this beta release > of postgresql on windows??? Or the problem is that the function is > imported from a 8.2.5 database? It works fine in all the extensive testing I've done on PostgreSQL 8.2 and 8.3, not to mention EnterpriseDB 8.1 and 8.2 - otherwise we wouldn't have released pgAdmin today. Can you post the source for your function, or a simple version with with you can recreate the problem? Regards, Dave
Dave,
the problem isn't with a particular function. Debug does not work with every function I try, even with the simplest one, always with the same behaviour I've previously explained.
I repeat, my postgresql server is an 8.3 beta 1 installed on the same machine where pgadmin III 1.8 is installed, a Windows XP SP2 machine.
If you need more details, let me know............
Roberto Icardi wrote: > Dave, > > the problem isn't with a particular function. Debug does not work with > every function I try, even with the simplest one, always with the same > behaviour I've previously explained. > I repeat, my postgresql server is an 8.3 beta 1 installed on the same > machine where pgadmin III 1.8 is installed, a Windows XP SP2 machine. > > If you need more details, let me know............ Well it works with 8.3 beta 1 on every function I've tried here (on XP SP2) - that was one of my tests when I built the release, plus I've just tested again to be sure. Are the debugger functions *all* loaded in the database you're trying to debug? there should be: pldbg_abort_target(integer) pldbg_attach_to_port(integer) pldbg_continue(integer) pldbg_create_listener() pldbg_deposit_value(integer, text, integer, text) pldbg_drop_breakpoint(integer, oid, integer) pldbg_get_breakpoints(integer) pldbg_get_proxy_info() pldbg_get_source(integer, oid) pldbg_get_stack(integer) pldbg_get_target_info(text, "char") pldbg_get_variables(integer) pldbg_select_frame(integer, integer) pldbg_set_breakpoint(integer, oid, integer) pldbg_set_global_breakpoint(integer, oid, integer, integer) pldbg_step_into(integer) pldbg_step_over(integer) pldbg_wait_for_breakpoint(integer) pldbg_wait_for_target(integer) plpgsql_oid_debug(oid) Regards, Dave
Yes, they are all there.... I've also tried on a newly created database instead of testing on a restored from 8.2. backup but with the same behaviour :-( ----- Original Message ----- From: "Dave Page" <dpage@postgresql.org> To: "Roberto Icardi" <roberto_icardi@hotmail.com> Cc: <pgsql-hackers@postgresql.org> Sent: Monday, October 22, 2007 4:09 PM Subject: Re: [HACKERS] pgadmin debug on windows > Roberto Icardi wrote: >> Dave, >> >> the problem isn't with a particular function. Debug does not work with >> every function I try, even with the simplest one, always with the same >> behaviour I've previously explained. >> I repeat, my postgresql server is an 8.3 beta 1 installed on the same >> machine where pgadmin III 1.8 is installed, a Windows XP SP2 machine. >> >> If you need more details, let me know............ > > Well it works with 8.3 beta 1 on every function I've tried here (on XP > SP2) - that was one of my tests when I built the release, plus I've just > tested again to be sure. > > Are the debugger functions *all* loaded in the database you're trying to > debug? there should be: > > pldbg_abort_target(integer) > pldbg_attach_to_port(integer) > pldbg_continue(integer) > pldbg_create_listener() > pldbg_deposit_value(integer, text, integer, text) > pldbg_drop_breakpoint(integer, oid, integer) > pldbg_get_breakpoints(integer) > pldbg_get_proxy_info() > pldbg_get_source(integer, oid) > pldbg_get_stack(integer) > pldbg_get_target_info(text, "char") > pldbg_get_variables(integer) > pldbg_select_frame(integer, integer) > pldbg_set_breakpoint(integer, oid, integer) > pldbg_set_global_breakpoint(integer, oid, integer, integer) > pldbg_step_into(integer) > pldbg_step_over(integer) > pldbg_wait_for_breakpoint(integer) > pldbg_wait_for_target(integer) > plpgsql_oid_debug(oid) > > Regards, Dave > > >
Roberto Icardi wrote: > Yes, they are all there.... > I've also tried on a newly created database instead of testing on a > restored from 8.2. backup but with > the same behaviour :-( Please post the definition of an affected function, along with the output from the following queries: select * from pldbg_get_proxy_info(); select * from pldbg_get_target_info('16480', 'o'); (where 16480 is replaced with the oid of the affected function). Thanks, Dave
> Please post the definition of an affected function, along with the > output from the following queries: > > select * from pldbg_get_proxy_info(); > select * from pldbg_get_target_info('16480', 'o'); > > (where 16480 is replaced with the oid of the affected function). > > Thanks, Dave > CREATE OR REPLACE FUNCTION public.prova(provain character varying) RETURNS character varying AS $BODY$ begin if (provain = 'A') then return 'INVALIDO'; else return 'VALIDO'; end if; end; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100; ALTER FUNCTION prova(character varying) OWNER TO postgres; select * from pldbg_get_proxy_info(); "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)";80300;3;3924 select * from pldbg_get_target_info('18891', 'o'); 18891;2200;1;"1043";"prova";"";"{provain}";16386;"public.prova";f;1043 Thank you for your interest
Roberto Icardi wrote: > CREATE OR REPLACE FUNCTION public.prova(provain character varying) > RETURNS character varying AS > $BODY$ > begin > if (provain = 'A') then > return 'INVALIDO'; > else > return 'VALIDO'; > end if; > end; > $BODY$ > LANGUAGE 'plpgsql' VOLATILE > COST 100; > ALTER FUNCTION prova(character varying) OWNER TO postgres; > > select * from pldbg_get_proxy_info(); > > "PostgreSQL 8.3devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) > 3.4.2 (mingw-special)";80300;3;3924 > > select * from pldbg_get_target_info('18891', 'o'); > > 18891;2200;1;"1043";"prova";"";"{provain}";16386;"public.prova";f;1043 OK, that looks as I'd expect (and debugs just fine for me!). When you attempt to debug it, do you see the parameter dialogue before it crashes, or does it go immediately? Also, please set pgAdmin to 'Debug' log level (under File->Options), create a new log of you recreating the crash (using direct debugging, not a global breakpoint) and then send me the logfile. Thanks, Dave.
----- Original Message ----- From: "Roberto Icardi" <roberto_icardi@hotmail.com> To: "Dave Page" <dpage@postgresql.org> Sent: Monday, October 22, 2007 5:31 PM Subject: Re: [HACKERS] pgadmin debug on windows >> When you attempt to debug it, do you see the parameter dialogue before >> it crashes, or does it go immediately? >> > > if I try debug->debug it goes immediately > if I try debug->set breakpoint I can see debugger window but is completely > empty and inactive > > > >> Also, please set pgAdmin to 'Debug' log level (under File->Options), >> create a new log of you recreating the crash (using direct debugging, >> not a global breakpoint) and then send me the logfile. >> > > Done >
Attachment
Roberto Icardi wrote: >> When you attempt to debug it, do you see the parameter dialogue before >> it crashes, or does it go immediately? >> > > if I try debug->debug it goes immediately > if I try debug->set breakpoint I can see debugger window but is > completely empty and inactive > > > >> Also, please set pgAdmin to 'Debug' log level (under File->Options), >> create a new log of you recreating the crash (using direct debugging, >> not a global breakpoint) and then send me the logfile. >> > > Done Doesn't shed any light though unfortunately. Do you have a firewall on that box? If so, can you try disabling it temporarily? Regards, Dave.
>>> Also, please set pgAdmin to 'Debug' log level (under File->Options), >>> create a new log of you recreating the crash (using direct debugging, >>> not a global breakpoint) and then send me the logfile. >>> >> >> Done > > Doesn't shed any light though unfortunately. Do you have a firewall on > that box? If so, can you try disabling it temporarily? > > Regards, Dave. > Only the windows firewall, if you can call it a firewall <g> Anyway, I've disabled, but without luck. Only thing I can add is that on that pc there where a previous release of PostgreSQL (8.2), uninstalled before 8.3 beta installation. Now I'll try with a Win2000 virtual machine. On this machine is installed 8.2 also, that I'm uninstalling right now. Regards
I've tried on the win2000 virtual machine (running on virtualpc 2007)... same error! So, or I make something wrong (but I really don't understand what), or is that particular pc, or maybe uninstalling 8.2 left something dirty for 8.3. I need a clean vm for testing third option, but requires some time to prepare. I'll do that as soon as I can. Thanks for your interest, Regards Roberto > > Doesn't shed any light though unfortunately. Do you have a firewall on > that box? If so, can you try disabling it temporarily? > > Regards, Dave. >
Roberto Icardi wrote: >>>> Also, please set pgAdmin to 'Debug' log level (under File->Options), >>>> create a new log of you recreating the crash (using direct debugging, >>>> not a global breakpoint) and then send me the logfile. >>>> >>> >>> Done >> >> Doesn't shed any light though unfortunately. Do you have a firewall on >> that box? If so, can you try disabling it temporarily? >> >> Regards, Dave. >> > > Only the windows firewall, if you can call it a firewall <g> > Anyway, I've disabled, but without luck. > Only thing I can add is that on that pc there where a previous release > of PostgreSQL (8.2), uninstalled before 8.3 beta installation. > Now I'll try with a Win2000 virtual machine. On this machine is > installed 8.2 also, that I'm uninstalling right now. Shouldn't matter - I have all manner of installs on my dev boxes - of various release and dev versions. Regards, Dave