Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Review Synopsis: Good for viewing variables and data structures, and for remote debugging

Devel::ptkdb is a graphical debugger using the Tk toolkit.

What's good?

The documentation is good.
It's easy to use, much easier than the normal perl debugger.
You can follow the flow of your program and choose if you want to step in or step over subroutine calls.
You can set and maintain breakpoints easily.
You can watch arbitrary expressions, variables and complex data structures during the run.
You can debug remote running programs and cgi scripts.
You can even debug Tk programs.

What's bad?

Though you can debug Tk programs, it is not always possible to do that.
It is a bit slow.
You need perlTk.
It is so nice, you might end up using it for debugging simple problems, where it is just overkill.

What's missing?

A regex debugger would be nice, but i think this will come with perl 6.


Devel::ptkdb is a full featured graphical debugger for perl written in perl by Andrew Page.

Though most of the time a simple print statement in the right place will tell you what's wrong, it's good to have a tool like this at hand.
The 'step in', 'step over' and 'return' buttons make it easy to follow the flow of the running program as you like.
You can see the values of needed expressions all the time, sometimes even inside of one statement, which is not possible for a print statement.
With very few changes to your program you can debug cgi scripts and cron tasks, a feature that comes more with the XWindow infrastructure than with ptkdb, but is nevertheless very useful.

Many thanks to Andrew Page for his work!

There has been much controversy about debugging lately in the Monastery and I'd rather put dozens of print statements in a program than starting the debugger, but sometimes it can be VERY handy.

For more thoughts on perl debugging have a look at the following nodes:

Are debuggers good?
Are debugging skills atrophying?
Book Review: Debugging Perl
Easy, elemental, but cool debug trick (read the comments)

In reply to Devel::ptkdb by busunsl

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, 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
  • 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (5)
    As of 2018-04-19 23:42 GMT
    Find Nodes?
      Voting Booth?