[MP2]: no access to the perl source when using the perl debugger

[MP2]: no access to the perl source when using the perl debugger

am 03.06.2008 10:51:43 von titetluc

------=_Part_623_2844853.1212483103436
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello all,

I am trying to use the perl debugger (using Apache mod_perl-2.0.2-6.3.el5
and httpd httpd-2.2.3-11.el).
I followed the instructions in
http://www.perl.com/pub/a/2006/02/09/debug_mod_perl.html and
http://perl.apache.org/docs/1.0/guide/debug.html but the debugger does not
run correctly.

The symptoms: the debugger is correcly called but does not dipslay the
source script. For example, when I access to the
Apache2::AuthSSO::Angie::authenticate_form method (declared in a
PerlAuthentHandler), the debugger displays

Apache2::AuthSSO::Angie::authenticate_form((eval
150)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):
1: (caller(0))[0]

instead of

Apache2::AuthSSO::Angie::authenticate_form(/mnt/go/public/pe rl/Apache2-AuthSSO-Angie/lib//Apache2/AuthSSO/Angie.pm:55):
55: my ($self, $r) = @_;

On the contrary, I can access the souce code for a method declared in the
PerlResponseHandler (see trace below)

What is wrong in my configuration ?
Could you please give me some hints ?


Below the debugger output :


[root@one Apache-DB-0.13]# /usr/sbin/httpd -X -DPERLDB
[notice] Apache::DB initialized in child 26694

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Apache2::Status::handler(/usr/lib/perl5/vendor_perl/5.8.8/i3 86-linux-thread-multi/Apache2/Status.pm:110):
110: my ($r) = @_;
DB<1> c
Apache2::AuthSSO::Angie::authenticate_form((eval
150)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):
1: (caller(0))[0]
DB<1> n
Apache2::AuthSSO::Angie::authenticate_form((eval
151)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions/Cache/FastMmap.pm:44]:1):
1: (caller(0))[0]
DB<1>



DB<1> r
scalar context return from Apache2::AuthSSO::Angie::authenticate_form: 0
Apache2::AuthSSO::session_refresh((eval
161)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:64]:1):
1: (caller(0))[0]
DB<1> n
Apache2::AuthSSO::session_refresh((eval
162)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:83]:1):
1: (caller(0))[0]
DB<1>
Apache2::AuthSSO::session_refresh((eval
163)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:174]:1):
1: (caller(0))[0]
DB<1>
Apache2::AuthSSO::session_refresh((eval
164)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:90]:1):
1: (caller(0))[0]
DB<1> r
scalar context return from Apache2::AuthSSO::session_refresh: 0
Apache2::AuthSSO::BackEndFactory::send_to((eval
175)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /BackEndFactory.pm:179]:1):
1: (caller(0))[0]
DB<1> r
scalar context return from Apache2::AuthSSO::BackEndFactory::send_to: 0
Apache2::AuthSSO::Angie::authenticate_form((eval
185)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):
1: (caller(0))[0]
DB<1> r
scalar context return from Apache2::AuthSSO::Angie::authenticate_form: 0
Apache2::AuthSSO::session_refresh((eval
196)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:64]:1):
1: (caller(0))[0]
DB<1> r
scalar context return from Apache2::AuthSSO::session_refresh: 0
Apache2::AuthSSO::BackEndFactory::send_to((eval
210)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /BackEndFactory.pm:179]:1):
1: (caller(0))[0]
DB<1> r
scalar context return from Apache2::AuthSSO::BackEndFactory::send_to: 0
Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:16):
16: my ($self,$r) = @_;
DB<1> n
Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:18):
18: my $cookie = 1;
DB<1>
Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:19):
19: $r->content_type('text/plain');
DB<1>

------=_Part_623_2844853.1212483103436
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello all,

I am trying to use the perl debugger (using Apache mod_perl-2.0.2-6.3.el5 and httpd httpd-2.2.3-11.el).
I followed the instructions in but the debugger does not run correctly.


The symptoms: the debugger is correcly called but does not dipslay the source script. For example, when I access to the Apache2::AuthSSO::Angie::authenticate_form method (declared in a PerlAuthentHandler), the debugger displays


Apache2::AuthSSO::Angie::authenticate_form((eval 150)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):

1:      (caller(0))[0]

instead of

Apache2::AuthSSO::Angie::authenticate_form(/mnt/go/public/pe rl/Apache2-AuthSSO-Angie/lib//Apache2/AuthSSO/Angie.pm:55):
55:         my ($self, $r) = @_;

On the contrary, I can access the souce code for a method declared in the PerlResponseHandler (see trace below)


What is wrong in my configuration ?
Could you please give me some hints ?


Below the debugger output :


[root@one Apache-DB-0.13]# /usr/sbin/httpd -X -DPERLDB
[notice] Apache::DB initialized in child 26694


Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

Apache2::Status::handler(/usr/lib/perl5/vendor_perl/5.8.8/i3 86-linux-thread-multi/Apache2/Status.pm:110):

110:        my ($r) = @_;
  DB<1> c
Apache2::AuthSSO::Angie::authenticate_form((eval 150)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):
1:      (caller(0))[0]
  DB<1> n

Apache2::AuthSSO::Angie::authenticate_form((eval 151)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions/Cache/FastMmap.pm:44]:1):
1:      (caller(0))[0]
  DB<1>
 
<snip>

  DB<1> r

scalar context return from Apache2::AuthSSO::Angie::authenticate_form: 0
Apache2::AuthSSO::session_refresh((eval 161)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:64]:1):
1:      (caller(0))[0]

  DB<1> n
Apache2::AuthSSO::session_refresh((eval 162)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:83]:1):
1:      (caller(0))[0]
  DB<1>
Apache2::AuthSSO::session_refresh((eval 163)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:174]:1):

1:      (caller(0))[0]
  DB<1>
Apache2::AuthSSO::session_refresh((eval 164)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:90]:1):
1:      (caller(0))[0]
  DB<1> r
scalar context return from Apache2::AuthSSO::session_refresh: 0

Apache2::AuthSSO::BackEndFactory::send_to((eval 175)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /BackEndFactory.pm:179]:1):
1:      (caller(0))[0]
  DB<1> r
scalar context return from Apache2::AuthSSO::BackEndFactory::send_to: 0

Apache2::AuthSSO::Angie::authenticate_form((eval 185)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Sessions.pm:42]:1):
1:      (caller(0))[0]
  DB<1> r
scalar context return from Apache2::AuthSSO::Angie::authenticate_form: 0

Apache2::AuthSSO::session_refresh((eval 196)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /Session.pm:64]:1):
1:      (caller(0))[0]
  DB<1> r
scalar context return from Apache2::AuthSSO::session_refresh: 0

Apache2::AuthSSO::BackEndFactory::send_to((eval 210)[/mnt/go/public/perl/Apache2-AuthSSO/lib/Apache2/AuthSSO /BackEndFactory.pm:179]:1):
1:      (caller(0))[0]
  DB<1> r
scalar context return from Apache2::AuthSSO::BackEndFactory::send_to: 0

Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:16):
16:         my ($self,$r) = @_;
  DB<1> n
Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:18):

18:         my $cookie = 1;
  DB<1>
Apache2::AuthSSO::Test::response(/usr/lib/perl5/site_perl/5. 8.5/Apache2/AuthSSO/Test.pm:19):
19:         $r->content_type('text/plain');
  DB<1>




------=_Part_623_2844853.1212483103436--

Re: [MP2]: no access to the perl source when using the perl debugger

am 03.06.2008 20:33:55 von Perrin Harkins

On Tue, Jun 3, 2008 at 4:51 AM, titetluc titetluc wrote:
> The symptoms: the debugger is correcly called but does not dipslay the
> source script.

My guess is that you are loading the code being debugged before
calling Apache::DB->init(), so this code was compiled with no
debugging hooks installed. Either make your call to Apache::DB sooner
or take this stuff out of your startup.pl and load it later when you
want to debug it.

- Perrin

Re: [MP2]: no access to the perl source when using the perl debugger

am 04.06.2008 13:12:37 von titetluc

------=_Part_6401_19186861.1212577957461
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/6/3, Perrin Harkins :
>
> On Tue, Jun 3, 2008 at 4:51 AM, titetluc titetluc
> wrote:
> > The symptoms: the debugger is correcly called but does not dipslay the
> > source script.


Your guess is correct !!! I called Apache::DB->init() too late
Thanks a lot for your valuable help.



My guess is that you are loading the code being debugged before
> calling Apache::DB->init(), so this code was compiled with no
> debugging hooks installed. Either make your call to Apache::DB sooner
> or take this stuff out of your startup.pl and load it later when you
> want to debug it.
>
>
> - Perrin
>

------=_Part_6401_19186861.1212577957461
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



2008/6/3, Perrin Harkins <>:

On Tue, Jun 3, 2008 at 4:51 AM, titetluc titetluc <> wrote:
> The symptoms: the debugger is correcly called but does not dipslay the
> source script.


Your guess is correct !!! I  called Apache::DB->init() too late
Thanks a lot for your valuable help.




My guess is that you are loading the code being debugged before
calling Apache::DB->init(), so this code was compiled with no
debugging hooks installed.  Either make your call to Apache::DB sooner
or take this stuff out of your startup.pl and load it later when you

want to debug it.


- Perrin



------=_Part_6401_19186861.1212577957461--