Thanks for the tip Erik, perldebguts has some clues as to what is happening.

I have made some progress in that when the debugger is in a normal module, variables _<$filename contain what the documentation says to expect.

When I'm inside one of my coderefs, I get the string __ANON__ or something like eval 6 quoted as a module name. I tried stuffing an array called _<__ANON with my lines of code, but this made no difference. Also, I'm presuming these debug variables are package not lexical, as they appear to be lumped together in a typeglob. Evidence suggests that all these debug variables go into package main::.

I want a way of priming the debugger with my lines of code before it drops into the coderef.

Update: Looking at perl5db.pl and perlfunc on caller, I see that what I need to do is fake a call, supplying the correct source and line information so that caller can see it. How to do this? I've re-read the chapters on XS programming in Advanced Perl programming , but this does not even mention the supplementary information passed into a call for the debugger. Maybe this book pre-dates perl5db. Any help would be appreciated.

--rW


In reply to Re: Re: On debugging coderefs and inside evals by rinceWind
in thread On debugging coderefs and inside evals by rinceWind

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!
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.