[techtalk] Perl debugger advice needed

Fan, Laurel Laurel.Fan at compaq.com
Fri Jul 7 13:23:49 EST 2000


Lynn Kuhlman, lynn at eskimo.com said:
> How can you go to a particular line in a program and execute it and the
> following lines? I want to jump over a loop and examine the contents of
> the hash table and then move on. I know it is line number something but
> the something part I can't remember.

According to man perldebug and the h command in the debugger, you
probably want to use the c (for continue) command.

Supposing your loop ends at line 20, you'd do

c 20

which means continue to line 20.  This'll land you at the end of the loop,
line 20, without stopping along the way.  Then, you can do examining, then
n, s, or more c (c without arguments goes to the next breakpoint or the
end of the program) to keep going.

(Note that this won't actually skip the execution of the loop, it just
won't stop there. I don't know if you can tell the debugger not to run
stuff; I usually just comment it out)





More information about the Techtalk mailing list