Debugging Perl
Configuring the Perl DebuggerTo specify which Perl interpreter Komodo uses to debug and run Perl programs:
To start a local Perl debugging session: On the Debug menu or Debug Toolbar, click Go/Continue ('F5') or Step In ('F11') to invoke the debugging session. See Komodo Debugger Functions for full instructions on using Komodo's debugging functionality.
Debugging Perl RemotelyWhen debugging a Perl program remotely, the program is executed on the remote system and the debug output is sent to Komodo. Komodo controls the debugging session (e.g. stepping and breakpoints) once the session starts on the remote system. Perl remote debugging works on any system that can run the version of perl5db.pl distributed with Komodo. ActivePerl and most other distributions of Perl (version 5.6 or greater) will work. Note: If you have the ActiveState Perl Development Kit (PDK) installed, follow the instructions for PDK users to disable the PDK debugger before continuing. To debug Perl programs remotely: Step One: Configure the Remote Machine
Step Two: Listen for Remote Debugger In Komodo, on the Debug menu, click Listen for Remote Debugger. Step Three: Start the Perl Program on the Remote Machine Start the debugging process using the "-d" flag:
A Perl Debug tab is displayed in Komodo. Step Four: Debug the Perl Program using Komodo Use 'F11' to Step In, or 'F5' (Go) to run to the first breakpoint. See Komodo Debugger Functions for full instructions on using Komodo's debugging functionality.
Disabling and Enabling the Perl Dev Kit (PDK) DebuggerIf you have installed the ActiveState Perl Development Kit (PDK) on the
remote machine, the system may be configured to use the PDK debugger when a Perl
debug session (
Disabling the PDK Debugger on the Remote MachineTo disable the PDK debugger on the remote machine, perform one of the following three procedures: Option 1: (Windows and Unix) At the command shell, enter the following command (depending on your operating system): Windows set PERL5DB=BEGIN { require 'perl5db.pl'; } Unix export PERL5DB="BEGIN { require 'perl5db.pl'; }" To re-enable the PDK debugger, set the Option 2: (Windows)
These changes take effect only in new DOS windows. To re-enable the PDK
debugger, delete the Option 3: (Windows) Change the registry setting for
Warning: This registry setting is semi-permanent and persists through machine restarts. This change takes effect only in new DOS windows. To re-enable the PDK
debugger, rename the
Configuring Perl for CGI DebuggingDebugging CGI programs on live production servers can seriously impair performance. We recommend using a test server for CGI debugging. Instructions for configuring Microsoft IIS and Apache (Unix) servers are shown below; for other web servers, use these examples and the web server software documentation as a guide for modifying the server environment. The settings and paths listed are examples only. Substitute these with the specific paths, hostnames and port numbers of your server as necessary
Configuring a Microsoft IIS Web Server
Configuring an Apache Web ServerEnsure that Perl CGI scripts are operating correctly on the Apache server
before proceeding with CGI debugger configuration. If you are running Apache
under Windows, disable the Remote debugging works with a stand-alone Perl interpreter or with the mod_perl Apache module.
Starting a CGI Debugging SessionAfter the configuration is complete, debug programs as follows:
|