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

comment on

( [id://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.

Bottomline

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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found