Restoring the native Perl debugger on 32 bit systems

Posted by troyt on 2006-07-06 10:53
OS: Windows | Product: Perl Dev Kit | tags: debugger

How do I switch back to using the native Perl command line debugger?


When the Perl Dev Kit is installed, the PDK's Graphical Debugger becomes the default debugger, replacing the console debugger included with your Perl distribution.

To disable the Graphical Debugger included with the Perl Dev Kit and use the console debugger instead, perform the following steps:

  1. Ensure that the Graphical Debugger is set to remote mode.
    • On the command line, enter pdkdebug --query to view the current mode.
    • If necessary, enter pdkdebug --remote to set the debug listener to local mode.
  2. Set the debugger to the console debugger included with Perl 5.x. On the command line, enter:
        set PERLDB_OPTS=

To disable the Graphical Debugger permanently, remove the PERL5DB key from HKEY_LOCAL_MACHINE\SOFTWARE\Perl and remove the PERLDB_OPTS system environment variable.

twotone | Tue, 2007-05-01 13:35

I installed perl dev kit 7 and used the graphical debugger a little bit in a cgi environment (called from web browser). Then I upgraded to komodo and installed it. Now, I can't get the graphical debugger from pdk to stop running automatically even after following the instructions to disable it and remove it as a system service. How do I enable the komodo debugger? (I am on Windows vista, perl 5.8, abyss X1 web server)

ActiveState Staff
Tue, 2007-05-01 14:09

The Komodo debugger is instantiated from within Komodo: open the perl script in Komodo, then click 'Debug|Start New Session' or the 'Go/Continue Debugging' button.

As for disabling the PDK debugger so that 'perl -d' works at the command-line as expected, the instructions above should work. Is it possible that those environment variables are persisting somewhere (e.g. set in one console but not in the system).

You could also try the command 'pdkdebug --remove'. Make sure the PDK bin/ directory is in your path; if not specify the full path to pdkdebug.exe.

ActiveState Staff
Tue, 2007-05-01 15:32

After discussing this with Jan Dubois, it seems that the initial FAQ instructions were wrong.

Use `pdkdebug --remote`, then `set PERLDB_OPTS=`.

I've updated the FAQ, thanks for pointing this problem out.

twotone | Tue, 2007-05-01 20:26

In the Dos command window I tried `pdkdebug --remove`, `set PERL5DB=BEGIN` and `set PERLDB_OPTS=` and the pdk debugger still launched, but I didn't try `pdkdebug --remote`. I finally got the pdk debugger to stop by removing the registry entry at HKEY_LOCAL_MACHINE>SOFTWARE>Perl>PERL5DB I think it was (Windows Vista made me boot into safe mode to delete the registry entry).

After some hair pulling, I have posted here how I finally got the komodo debugger to run in a cgi environment, triggered by executing a script from the browser.

twotone | Tue, 2007-05-01 19:48

All right. I removed the entry in the registry for the pdk graphical debugger and no it is not running automatically when I load the script in the browser.

And yes, komodo supports (according to the help file) debugging in a cgi environment by loading the web page / script first - not running the perl script as 'perl -d'. From the help file:

After the configuration is complete, debug programs as follows:

* In Komodo, on the Debug menu, click Listen for Debugger Connections.
* Using a web browser, access your CGI script.
* A Perl Debug tab is displayed in Komodo. See Komodo Debugger Functions for full instructions on using Komodo's debugging functionality.