Steps to Run the GUI Based Debugger:

  1. Save your Perl program in a file, say hello.pl. To start the debugger, type the following command if you are using the bash:
    % PERL5LIB=~cs898n/pub/ptkdb; export PERL5LIB
    % perl -I`echo ~cs898n/pub/ptkdb` -d:ptkdb hello.pl
    
    If you are using the csh, you can set the environment variable as follows:
    % setenv PERL5LIB cs898n/pub/ptkdb
    
    Note: You only need to set the environment variable once. If you are using the bash, you can do it by inserting the following line to the bash startup file ~/.bash_profile:
    PERL5LIB=~cs898n/pub/ptkdb; export PERL5LIB
    
  2. The graphical user interface of the debugger is self-explanatory. You can get more details from the Ptkdb User Guide.

  3. If you don't like this graphical debugger, you can use the manual source debugger by typing the following command:
    % perl -d hello.pl
    
    You can read the online man pages for the Perl source debugger with the man command:
    % man perldebug
    
    If you are using the xemacs, you can invoke the Perl source debugger in the Emacs.