Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Alright... it started off as a simple little problem. Just use somebody else's code and not have to worry about how things get done. Apparently I was oh so very wrong. The problem I have is that the engineer who wrote the code seems to have learned some new tricks and decided to put them where they don't belong, and to top it off left for vacation... hurray! hehe

Anyways... there are two types of code that I need to be able to break on and haven't come up with a good way to break in them. One is an eval, which using my deductive reasoning is probably stepable through but I haven't tried yet.

The other code I'm having trouble with though is that the engineer has used modules (not the problem) but has used references to the other module functions elsewhere to essentially do switches in his code. I'm not familiar with the more powerful stuff with debugging so I don't know how to break on something like:

&$function($arg1, $arg2);
I would just set a breakpoint on a line number but this is in another module and the path to get there is a little bizarre. I tried setting a breakpoint on "Module::function" but that didn't stop it. Which leads me to believe that either breakpoints don't work that way, or with my luck I've isolated a chunk of code that I thought did something that actually never gets called.

... This is slowly become a nightmare and I guess I need to learn some tricks for using the debugger, because to top it off I can't check out this code to put in print statements or anything... and as the final blow to making anything even understandable this is a client/server program, with both in the same code base and the code that is run for the client or the server is indistiguishable from the other.

So any monks out there have any words of wisdom or advice (other than quit your job... hehe) I'd really appreciate it. Thanks!!!


In reply to How to debug unknown dynamic code? by gaspodethewonderdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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:
    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
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (13)
    As of 2014-07-30 18:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (239 votes), past polls