In addition to what tilly
says, why not just break on the line that contains '&$function($arg1, $arg2)' and then
step to the next statement and see where it goes. Which brings me to
why I've forced myself to learn the debugger (with which I am now
says just don't
put bugs in your code, and write small bits of code that work,
which is great when you're writing your own code.
maintaining someone elses 3000+ line (not including modules) spaghetti code that
uses neither strict nor warnings, and you're wondering how the
program got from point A to point B and how some global variable
seemed to get magically populated (by some module C), to me there's
nothing like a decent debugger to trace the (@#$@#!!) damn
thing. And sometimes I don't want
to put in print statements
to see what "$a" is at point A, because then I just have
to remove (or comment out) the print statement later, or
by the time I get to point A, I find that I really wanted to
see what "$b" was, and with a debugger I can do that without
restarting the whole program.
I've worked with other programmers (in another language, 4gl if
you must know) that couldn't use a debugger, and stared at a
problem for days wondering what was going on, when with the help of the debugger the problem was
found (in some deep dark library) in an hour or two.
I think that the only thing (that I can think of at the moment)
that the perl debugger needs is the ability to save break points
and/or accept some input script (like break at line 100; step
1 line (requiring some module), then break at some function
in that module if $i > 54). If someone knows how to do this,
please let me know :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||