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

Devel::ptkdb

by busunsl (Vicar)
on May 07, 2001 at 12:13 UTC ( [id://78455]=modulereview: print w/replies, xml ) Need Help??

Item Description: Graphical debugger for perl

Review Synopsis:

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)

Replies are listed 'Best First'.
Re: Devel::ptkdb
by rinceWind (Monsignor) on Mar 06, 2002 at 22:37 UTC
    Devel::ptkdb came in very handy for some home CGI development. Just by amending the shebang line:
    #!/usr/local/bin/perl -d:ptkdb
    I was able to debug a script. I guess it would work for SSI as well.

    <nonperl>The configuration is just 1 standalone windows PC (win98). I was using the Xitami webserver and accessing from a browser using http://localhost/cgi-bin/myscript.pl. I got bitten by timeouts, till I found where they had hidden the CGI timeout parameter in the admin menus.</nonperl>

    I recommend this to newbies with script problems with code downloaded. This might reduce the amount of CGI queries we are getting on SOPW.

Re: Devel::ptkdb
by ralphie (Friar) on Aug 06, 2001 at 03:22 UTC
    most of the perl i write runs on debian boxes that i have set up for various uses and which i access from a win2k machine through a combination of the interix shells and the xwinpro x-server. i use this module to debug those scripts, and find that it works quite well. i've dedicated one older machine to running scripts, a p75 w/32 mb ram, and in that context the module is surprisingly responsive and usable.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: modulereview [id://78455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found