How to go up trace stack in debugger?

J

J Krugman

Here's a recurrent situation. I'm running a program in the debugger,
the program dies for some reason, and I want to inspect the scope
in which the current function was called. In other words, I want
to be able to climb up the stack trace and poke around there. How
can I do this?

Thanks!

-Jill
 
P

Peter Scott

Here's a recurrent situation. I'm running a program in the debugger,
the program dies for some reason, and I want to inspect the scope
in which the current function was called. In other words, I want
to be able to climb up the stack trace and poke around there. How
can I do this?

It's not as pretty in Perl compared to what some other debuggers
for other languages offer. You can see the stack trace with 'T'.
That tells you enough to go manually display the source code of
the higher levels (with the 'f' and 'l' commands). I got fed up
with not being able to see lexical variables in the higher levels
and added the 'y' command in 5.8.0, which does that. You'll need
the PadWalker module from CPAN.

Summary: you can do most things you want to, but they take effort.
 
J

J Krugman

I got fed up
with not being able to see lexical variables in the higher levels
and added the 'y' command in 5.8.0, which does that. You'll need
the PadWalker module from CPAN.

Thanks! I'll give it a go.

-Jill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top