ActiveState Community

Viewing local variables in previous stack frame (Perl)?

Posted by duckandcover on 2008-01-05 18:58

(Note I thought I had posted this but I don't see it so this is a re-post).
I'm running perl in komodo and when I switch to a previous stack frame (via the call stack tab), the local variables window still shows the variables of the top stack frame vs the one I selected. Am I missing something?

ericp | Tue, 2008-07-01 13:06

Unlike the other languages Komodo supports, Perl doesn't make it easy to get at the local variables in scope at any time. Many years ago I tried a CPAN XS module called PadWalker to get at them, but then PadWalker couldn't handle module-level variables well, and didn't distinguish them from true local variables. So ever since, we've done what most graphical Perl debuggers have resorted to doing -- analyzing the current source to find the current variables (called "proximity variables"), and hoping for the best.

Unfortunately the code doesn't adapt for other lines in the call stack. It should, and this is a bug. Could you please file it?

- Eric

jgangemi | Tue, 2008-07-01 18:35

have you tried one of the current versions of PadWalker? perhaps this limitation has been fixed.

-jae

ericp | Wed, 2008-07-02 10:58

Please see http://bugs.activestate.com/show_bug.cgi?id=70425

The bug I reported (in 2003) was fixed two years later, so it
could be worth retrying.