![]() ![]() If you use #!/usr/bin/perl (or an equivalent) to invoke your Perl program, you can add the -d:ptkdb immediately afterwards to invoke the debugger from inside the program. At this point the debugger has stopped the program and is waiting for your command. The ptkdb window will appear and the first executable line of your program will be highlighted. Once ptkdb has been installed, you can debug your programs with it like so: Perl debugger install#If you're unable to install ptkdb into your system's Perl library, you can run ptkdb from the directory where you invoke Perl: Or, you can use the install_ program, which uses a Perl/Tk user interface to guide you through the process. Perl debugger archive#The archive contains all the files needed to install ptkdb you can use either the usual module installation process: Ptkdb can be downloaded and installed from the CPAN at. Perl's debugger might be all you ever need, but if you want the convenience of a graphical debugger, you can install ptkdb. You can find out all of the options by typing h for help. When you run a program with the -d switch, Perl stops at the first line of code and displays a prompt. This is handy if you just want to execute a series of Perl statements without creating an actual program. Or, to enter the debugger directly without a program at all, It's part of the standard distribution, and it's line-oriented - you type your commands, and you see a command prompt as you step through your program line by line, or when you hit a breakpoint. Because ptkdb is written in Perl/Tk, it works on all flavors of Unix as well as Windows. SolutionSoft and ActiveState each make one, but they're only for Windows, and they're not free, like ptkdb. There are other visual debuggers for Perl. ![]() ![]() (A breakpoint is a position in your program where the debugger stops execution and lets you inspect your program's data structures.) It lets you examine a variable's contents by moving your cursor over it, and it lets you set breakpoints with the click of a mouse. My debugger, ptkdb, is a visual debugger. You can query the contents of variables to see how they change, or monitor how often a subroutine is called. Many modern programming languages have debuggers, which let you examine the internals of your program as it runs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |