Perl debugging: move up and down in call chain? 
Author Message
 Perl debugging: move up and down in call chain?

De{*filter*}s like gdb, dbx and jdb provide commands up and down which
allow me to move around in the call chain, for examining (lexically)
local variables.

Suppose I have stopped a Perl program in a function foo, and the
backtrace tells me that foo was called from bar, and there is a `my'
variable $x in bar.  How do I access the current value of that
variable from the Perl de{*filter*}?

The perldebug man page does not give any hints.

kai
--
I like BOTH kinds of music.



Mon, 27 Jan 2003 03:00:00 GMT  
 Perl debugging: move up and down in call chain?



Quote:
> De{*filter*}s like gdb, dbx and jdb provide commands up and down which allow
> me to move around in the call chain, for examining (lexically) local
> variables.

> Suppose I have stopped a Perl program in a function foo, and the
> backtrace tells me that foo was called from bar, and there is a `my'
> variable $x in bar.  How do I access the current value of that variable
> from the Perl de{*filter*}?

You can't. (that is, Perl code doesn't have access to lexicals in
those scopes).

--
Ned Konz
currently: Stanwood, WA

homepage:   http://www.*-*-*.com/



Mon, 27 Jan 2003 03:00:00 GMT  
 Perl debugging: move up and down in call chain?

Quote:




>> De{*filter*}s like gdb, dbx and jdb provide commands up and down which
>> allow me to move around in the call chain, for examining
>> (lexically) local variables.  [[ How do I do this in the Perl
>> de{*filter*}? ]]

> You can't. (that is, Perl code doesn't have access to lexicals in
> those scopes).

Thanks for the reply.  I will have to resort to `print' debugging,
then.

Do you agree that it would be a useful feature to have?  (If you
don't, maybe I have overlooked something which could help me in
debugging my programs.)

Are there any plans for extending the Perl de{*filter*} such that this is
possible?

kai
--
I like BOTH kinds of music.



Fri, 31 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to compare bookmarks?

2. Moving cursor Up and Down in text widget

3. mv, move, or some way to move files in perl

4. mv, move, or some way to move files in perl

5. Newbie needs help debugging code called from perl script

6. debug perl script called by webserver

7. Is there a util to take MDB and give Interbase?

8. Tk Window not displaying properly after bringing down GUI started with system call

9. How to build single debug call for module?

10. ANNOUNCE: Debug::Trace 0.04 -- tracing subroutine calls

11. Debugging calls to GD.pm

12. UPS Shipping cgi/perl script needed

 

 
Powered by phpBB® Forum Software