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