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:
pdkdebug --query to view the current mode.pdkdebug --remote to set the debug listener to local mode.
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.
How can I quickly switch between using the PDK Debugger and the command
line debugger?
Here is a batch file for manipulating the relevant environment variables:
@ECHO OFF
SET MODE=%1
IF "%MODE%" == "PDK" GOTO PDK
IF "%MODE%" == "CLI" GOTO CLI
ECHO "no valid input? usage: DBSET "
ECHO "possible modes PDK or CLI"
GOTO END
:PDK
SET PERL5LIB=C:\Program Files\ActiveState Perl Dev Kit 6.0\lib\
SET PERL5DB=
GOTO REPORT
:CLI
SET PERL5LIB=""
SET PERL5DB=BEGIN { require 'perl5db.pl'; }
GOTO REPORT
:REPORT
ECHO Debugger mode set to %MODE%
:END
Copy the code into a file called DBSET.BAT, and move it into a directory in your PATH (e.g. C:\Perl\bin).
To use perl's regular command line debugger:
C:\> DBSET CLI
To use the PDK Debugger:
C:\> DBSET PDK