Through the Debugger with Gun and Camera

pemungkah on 2002-02-11T21:23:46

Being lazy and full of hubris in the good way, I decided that if I wanted to be able to display data structures in a debugger, that I should be able to do it in the debugger. Why not? Why give up all those great functions it's got just because I want a new one of my own?

Why not, indeed. I began digging into the debugger, and it is a wonderful, fascinating, terminally underdocumented, and monolithic piece of code. It does a lot of very heavy magic to be able to do an awful lot of processing without disturbing the running program, it is optimized out the ying-yang, uses a lot of arcane but useful techniques, and is not well-suited for extension. But hey, why let that stop me?

I've taken on the task (following encouragement by Schwern) of reformatting, commenting, and understanding it, hopefully well enough to talk about it at TPC and or YAPC.

It's really quite fascinating, and I think it'll make a good paper -- or man page, anyway.


Have you tried ptkdb?

djberg96 on 2002-02-11T22:36:10

Are you using the command line or ptkdb? I find that, unless I'm debugging a fork'ing program, there's no reason to use the command line debugger. The array and hash layouts are very nice.

As for how to use it, there's "Perl Debugged" and "Debugging Perl", both of which discuss how to use the debugger (though they talk about much more than that).