investigating the perldebugger shows some nice features like producing stack traces of every call
tst.pl:
sub a { b(@_) } sub b { return map { $_ +1 } @_; } print a (1,2,3)
interactive example (could be fully automated)
perl -d tst.pl Loading DB routines from perl5db.pl version 1.3 Editor support enabled. Enter h or `h h' for help, or `man perldebug' for more help. Package /tmp/tst.pl. DB<3> o f=31 frame = '31' DB<4> c in @=main::a(1, 2, 3) from /tmp/tst.pl:9 in @=main::b(1, 2, 3) from /tmp/tst.pl:2 out @=main::b(1, 2, 3) from /tmp/tst.pl:2 list context return from main::b: 0 2 1 3 2 4 out @=main::a(1, 2, 3) from /tmp/tst.pl:9 list context return from main::a: 0 2 1 3 2 4

my only problem is how to avoid in deep tracing of third-party modules I use.

is there any option where I can provide a pattern which modules/subs/file-pathes to trace and which to ignore?

Could also be useful for automatic distinction between step-in /step-over when single-stepping...


In reply to perldb: Howto trace only "my" modules? by The Perlman

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.