Enrico Sorcinelli wrote:
> On Fri, 01 Mar 2002 11:16:15 +0800
> Stas Bekman <[EMAIL PROTECTED]> wrote:
> 
> 
>>Enrico Sorcinelli wrote:
>>
>>>Hi all,
>>>I started to use Apache::DB (0.06) to interactively debug under mod_perl using 
>ptkdb. I see that is necessary to modify Apache/DB.pm but, after this, the debugger 
>will be run always under ptkdb. The little patch I propose to Apache/DB.pm is to 
>improve Apache to dinamically switch from command line to GUI (ptkdb) interface by 
>configuring this in httpd.conf.
>>>
>>Hi Enrico,
>>
>>Does it actually work for you? My previous experience with it wasn't so 
>>good. I was manually loading Devel/ptkdb.pm instead of Apache/perl5db.pl
>>and it'll work for the first request, but then will hang. I see that 
>>ptkdb hasn't changed since the last time I've tried it. May be it's a 
>>newer perlTk that works better now?
>>
>>
> 
> Dear Stas,
> I know the hang problem (I've started to hack the ptkdb code but it is enough 
>complex...)
> However I find the GUI debugger useful. My TEMPORARY workaround is:
> 
> 1) Initially (and if possible) I've used a brutal 'kill 9 $$' code in cleanup handler
> 
>     if (ref $r) {
>       $SIG{INT} = \&DB::catch;
>       $r->register_cleanup(sub { 
>           $SIG{INT} = \&DB::ApacheSIGINT();
> 
>>>>        kill 9, $$ if $ptkdb;
>>>>
>       });
>     }

Yup, tried that, but I didn't like that approach.

> then now
> 
> 2) I use the ptkdb 'File' menu command "Close Window and Run" (but I've added this 
>in the button bar) instead of "Run". In this case at the end of code, the debugger 
>won't hang and the window will closed. Note that if there are breakpoint, the window 
>will be closed and re-opened and all breakpoint are maintained (it is more convenient 
>to use 'Close Window and Run' only after last breakpoint).

Cool! Any chance you can submit a patch to the author of ptkdb so we can 
all benefit from this trick? CC'ing mod_perl list will be useful too.

I wish someone with perl/Tk knowledge could solve the hanging problem.

Thanks Enrico!



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to