Peter -- ...and then Peter Scott said... % % At 06:01 AM 6/23/02 -0500, David T-G wrote: % >% Would you like tracing that goes off when you go into a function? % >Suppose % >% if you gave a numeric argument to 't' it would trace up to that depth % >% in subroutine calls beneath the current level but not beneath? That % >% might be doable (as a patch to the debugger). % > % >Hmmm... That's a pretty attractive idea, actually. % % I'll see if I can whack it out. 'Course, it won't show up in an actual % release until 5.8.1, since 5.8.0 is on the verge of release.
Way cool! If you want me to test out the patch, I'd be happy to. Funny, I thought 5.8.0 had made it out the door. Shows how much I've been paying attention; I guess those are still RCs. % % > The point of -x, % >which certainly isn't much for one used to a debugger, is simply to print % >out each command that goes on and, as a bonus, see the values the script % >has at the time, and it's expected that you just dump that (stderr) off % >to a file and peruse it at leisure. The problem I've always had with a % >debugger is that you have to set breakpoints or step through EVERY SINGLE % >BLASTED STEP in order to see what's going on, and you want to not descend % >too far down into functions and such, and you still have to print values % >when you want to see how they're set at the time. % % Hey, I have a class on how to use the debugger. The last time I gave Great; you probably get requests like mine all the time, then :-) % it was on the Perl Whirl cruise in the Caribbean. Where were you? :-) I don't know, but I bet I would have rather been there! Sounds neat! % % To not step every statement: mostly, use 'n' instead of 's'. Get a % quick window on the source with 'w' and skip ahead with 'c <line>'. To % get out of the current subroutine, use 'r'. To print values % automatically, or even conditionally, use actions. To break at a loop % statement part way through the loop, use conditional breakpoints. Aaagh! Oomph! *blink* That sure flew by as it knocked me over. Time to tape those 5 lines to the top of my monitor and go back to the doc for the debugger... :-) % % -- % Peter Scott % Pacific Systems Design Technologies % http://www.perldebugged.com/ Thanks & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg26437/pgp00000.pgp
Description: PGP signature