Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How would you use perl debugging tools to pinpoint the problem here?

by BrowserUk (Patriarch)
on Nov 10, 2005 at 15:35 UTC ( [id://507406]=note: print w/replies, xml ) Need Help??


in reply to How would you use perl debugging tools to pinpoint the problem here?

First I would comment out half the top-level calls in the main program. In this case, commenting out sub_2(); prevents the "crash".

Having isolated (using a binary chop) which routine is causing the problem, I'd go into it, and assuming the problem didn't leap out at me as here, I'd comment out half of the body of the sub to find which half the problem lay in. That very quickly allows you to zero in on the line that is the problem.

There are other ways, and some of them are definitely more applicable in other languages, but using a binary chop of comments works very well and quickly in Perl (and most dynamic langauges).


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re: How would you use perl debugging tools to pinpoint the problem here?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://507406]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found