Komodo User Guide

Komodo FAQ

Komodo doesn't start

If Komodo doesn't start, there could be one of several issues.

  • Do you have a license installed?

Komodo needs a license to become functional. If you have a Beta release, we include a trial license with the package. If you have a final release (non-Beta), you can download a license from ActiveState.

  • Does your username have non-ASCII characters?

Komodo keeps your user preferences in an Application Data directory on Windows machines. For example, <installdir>\Documents and Settings\<username>\Application Data\ActiveState\Komodo.

In Komodo 1.0 and earlier, Komodo did not understand non-ASCII characters in your username, so when Komodo looked for your preferences file during startup, Komodo got confused. This issue was fixed in Komodo 1.1 Beta 1.

  • Do you have Norton Anti-Virus (NAV) installed, or more specifically, the File System Realtime Protection feature enabled?

The problematic relationship between Komodo and Norton Anti-Virus' File System Realtime Protection feature is a known issue, which we are working to remedy. In the meantime, you can disable NAV Corp 7.5 FSRP before running Komodo, and then re-enable it after Komodo starts.

Top

I can't see my Projects/Toolbox Pane

The Projects/Toolbox Pane may be hidden.

To view the Projects/Toolbox Pane, do one of the following:

  • Press Ctrl+Shift+P
or
  1. Click the middle of the vertical splitter bar (at the left margin of your Editor Pane)
  2. Drag to the right.
Top

I can't see my Output Pane

The Output Pane appears below the Editor Pane during debugging. If you can't see your Output Pane, it may be hidden. 

To view your Output Pane, do one of the following:

  • Press Ctrl+Shift+O

or

  1. Click the middle of the horizontal splitter bar (at the bottom margin of your Editor Pane)
  2. Drag upwards.

For more information, see Debugging Programs

Top

I want to maximize my Editor Pane

I like to see the Projects/Toolbox Pane and the Output Pane, but right now I want to maximize my Editor Pane to get some coding done. How can I maximize my Editor Pane?

To maximize your Editor Pane, hide the other panes in the Komodo workspace:

  1. Press Ctrl+Shift+P
    or
    Click the middle of the vertical splitter bar (at the left margin of your Editor Pane) and drag to the left. This hides the Projects/Toolbox Pane.
  2. Press Ctrl+Shift+O
    or
    Click the middle of the horizontal splitter bar (at the bottom margin of your Editor Pane) and drag down. This hides the Output Pane.
Top

How do I know if I'm debugging?

When Komodo is debugging, the title of the Komodo workspace includes an indication of the state of the debugger. If the debugger is running, the title looks similar to [pathname\filename] - ActiveState Komodo - Debugger is running. If the debugger has hit a breakpoint, the title looks similar to [pathname\filename] - ActiveState Komodo - Debugger is in Break Mode.

Top

How do I know if I'm editing?

You are editing any time you're not formally debugging. When Komodo is editing, the title of the Komodo workspace is [pathname\filename] - ActiveState Komodo.

Top

How can I add command-line arguments to my program for debugging?

If you want to send add command-line arguments to your program for debugging, you can add these using the Debugger Launch Options dialog:

  1. Go to the Debug menu and select Start or press F5.
  2. In the Debugger Launch Options dialog, select the directory you want to begin debugging your program in. Click Browse and navigate to the appropriate directory.
  3. In the same Debugger Launch Options dialog, enter your command-line arguments. These are sent to the script and not to the interpreter. Separate the arguments with spaces.
  4. Click OK.
Top

Komodo crashes. What can I do?

If Komodo crashes, please create the following error log files, find the files, verify their contents and send them to us so we can determine what happened:

  • stderr.tmp
  • stdout.tmp

Step 1: Creating the error log files

To create the error logs on Windows:

  1. Go to the Start menu and select Run.
  2. Enter cmd
  3. In the command box, change to the Komodo directory. The default is C:\Program Files\Komodo-x.x, where "x.x" is the Komodo version.
  4. In the Komodo directory, enter Komodo -v and press Enter.
    This starts Komodo.
  5. Perform the task that caused the original Komodo error.
  6. Close Komodo, or let it crash.

This creates the error log files and puts them in a directory as indicated in the table in Step 2: Locating the error log files.

Note - If Komodo "cancelled" itself, open the Task Manager and close the Mozilla process.

To create the error logs on Linux:

  1. In the command box, change to the Komodo directory. The default is ~/.komodo.
  2. In the Komodo directory, enter Komodo -v and press Enter.
    This starts Komodo.
  3. Perform the task that Komodo didn't like.
  4. Close Komodo, or let it crash.

This creates the error log files and puts them in your ~/.komodo directory, as indicated in the table in Step 2: Locating the error log files.

Note - If Komodo cancelled itself, close the Mozilla process.

To close the Mozilla process on Linux:

  1. Run ps ux to identify the Mozilla process id.
  2. Run kill <process id> to close that process.

Step 2: Locating the error log files

Komodo stores the error log files in a directory beneath the Application Data directory. The location of this directory varies according to the version of Windows, and whether or not User Profiles are enabled on your system. Use the following table as a guide for the file location. In the examples below, "x.x" refers to the version of Komodo that you are using.

System Location or, if User Profiles is enabled,
Windows XP C:\Windows\Application Data\ActiveState\Komodo\x.x C:\Documents and Settings\<username>\Application Data\ActiveState\Komodo\x.x
Windows 2000 C:\Windows\Application Data\ActiveState\Komodo\x.x C:\Documents and Settings\<username>\Application Data\ActiveState\Komodo\x.x
Windows NT C:\Windows\Application Data\ActiveState\Komodo\x.x C:\WINNT\Profiles\<username>\Application Data\ActiveState\Komodo\x.x
Windows Me C:\Windows\Application Data\ActiveState\Komodo\x.x C:\Windows\Profiles\<username>\Application Data\ActiveState\Komodo\x.x
Windows 98 C:\Windows\Application Data\ActiveState\Komodo\x.x C:\Windows\Profiles\<username>\Application Data\ActiveState\Komodo\x.x
Windows 95 C:\WINDOWS\Application Data\ActiveState\Komodo\x.x C:\WINDOWS\Profiles\<username>\Application Data\ActiveState\Komodo\x.x
Linux ~/.komodo n/a

Step 3: Verifying and sending the files to ActiveState

To send the error log files to ActiveState:

  1. Locate the files.
  2. Verify that the files are not blank by viewing them with a text editor.
  3. Send them to ActiveState with a description of what happened just before the crash. Email both files as attachments to Komodo-feedback@ActiveState.com.
Top

Why is Komodo so big?

Because Komodo is built on the Mozilla framework, it is necessary for us to include the Mozilla build that exactly matches the development version of Komodo. For that reason, even if you have Mozilla on your system, Komodo installs the Mozilla version that it requires.

Another sizeable component of Komodo is language support. Komodo is so tightly integrated with Perl, Python and PHP that it is necessary to include components of those languages, at specific version levels, for debugger and editor support.

Top

I already have Mozilla. Why do I need to have two versions?

When ActiveState develops a Komodo release, the work is based upon a specific version of Mozilla. During the development process, we upgrade the level of Mozilla used by Komodo, but this process requires considerable testing to ensure that no functionality is lost. Additionally, we add some custom components to the Mozilla tree that are used by Komodo. For these reasons, we recommend that you do not replace the Mozilla version included with Komodo with a later Mozilla version.

Top

How do I configure the PHP debugging extension?

Step 1 - Ensure PHP is properly installed and operational

Komodo requires PHP version 4.0.5 or greater. You can download PHP from http://www.php.net/downloads.php. If you want to debug PHP scripts under a Web server environment, be sure PHP is operating correctly with your Web server before configuring the debugger extension. Consult the PHP documentation for notes on configuring PHP with your Web server. Note: If you are installing PHP for the first time, the PHP installation program may not work correctly on Windows Millennium; please refer to the PHP site for installation instructions.

Windows Users

If you are installing PHP on Windows and are unfamiliar with the installation of PHP, we recommend that you download the distribution that is packaged as a Windows Installer. As of version 4.0.5, the package with the Windows Installer is not a full distribution and is significantly smaller than the full distribution, but it is enough to get started with debugging PHP in Komodo.

You can find detailed documentation on installing PHP manually at http://www.php.net/manual/en/install-windows.php. Ensure that the PHP directory is included in your system's PATH statement.

Linux Users

Komodo ships with a PHP extension to support PHP debugging. Your Linux system may already have PHP installed. Login and type 'php -v' to get the version of your currently installed PHP executable. If it is older than version 4.0.5 you will need to upgrade. You can find detailed documentation for installing and configuring PHP at http://www.php.net/manual/en/. RPMs are also available for Red Hat installations from www.redhat.com/apps/support/updates.html. You can find 4.0.5 RPM's at http://rpmfind.net/.

Your compilation of PHP must support loading dynamic extensions. This is the default configuration for PHP under Linux, so chances are your PHP installation already supports this.

If you are installing PHP to a non-default directory, you must add the following argument to the ./configure command:

--with-config-file-path=/path/to/phpini/ (note: this is only a path, do not include the filename)

where /path/to/phpini/ is the directory where the php.ini configuration file is stored. For further information about PHP installation, refer to http://www.php.net/manual/en/.

Step 2 - Copy Komodo's Debugging Extensions to PHP

In order to use Komodo to debug PHP programs, you must manually copy some shared library files distributed with Komodo into the php extensions directory. The destination location depends on the value assigned to the extension_dir variable in the php.ini file.

On Windows, the php.ini file is generally located in c:\windows, or c:\winnt, depending on your operating system. It may also be located in the same directory as your php.exe executable. On Linux, the default path is /usr/local/lib, but that may have changed when PHP was installed on your system. It may also be located in the same directory as your php.exe executable. These files are also available for download from the Komodo Remote Debugging page.

In order to determine the destination directory for the shared library files, open the php.ini file and search for the value extension_dir. This path will be needed for the instructions below. If you are installing PHP for the first time, the extension_dir may be set to "./". You should change this to a full, direct path, such as C:\php\extensions under Windows, or /usr/local/lib/php/extensions under Linux.

Windows Users

Files needed: ActiveDebug.dll

Source location: <komodo-install-directory>\php\ (by default, C:\Program Files\Komodo-x.x\php\debugging\php_version) (where x.x is the Komodo version)

Destination: ActiveDebug.dll should be placed in the extension_dir as defined in the php.ini file.

Linux Users

Files needed: activedebug.so

Source location: <komodo-install-directory>/php_version/ (by default, ~/Komodo-x.x/php/, where x.x is the Komodo version)

Step 3 - Edit the php.ini configuration file

Windows Users:

  1. Open the php.ini configuration file in Komodo.


  2. Search for "Dynamic Extension", and add the following lines to the section. The lines below have been formatted so that they can be cut from this document and pasted into the php.ini file:

    extension=activedebug.dll
    [ActiveDebugger]
    activedebug.enabled=1 ;set this value to "0" if you will only be doing local debugging, to "1" for multi-person remote debugging, or to "3" for single-person remote debugging

    ;Remote Debugging Only

    activedebug.host=localhost ;where "localhost" is the domain name of the machine running Komodo
    activedebug.port=9001 ; the port that PHP listens on, typically 9001
    activedebug.remoteport=9000 ; the port specified in the Debugger Preferences, by default "9000"

Linux Users:

  1. Open the php.ini configuration file in Komodo, or some other editor such as emacs or vi.


  2. Search for "Dynamic Extension", and add the following lines to the section. The lines below have been formatted so that they can be cut from this document and pasted into the php.ini file:

    extension=activedebug.so
    [ActiveDebugger]
    activedebug.enabled=1 ;set this value to "0" if you will only be doing local debugging, to "1" for multi-person remote debugging, or "3" for single-person remote debugging

    ;Remote Debugging Only

    activedebug.host=localhost ;where "localhost" is the domain name of the machine running Komodo
    activedebug.port=9001 ;the port that PHP listens on, typically 9001
    activedebug.remoteport=9000 ; the port specified in the Debugger Preferences, by default "9000"

Step 4 - (optional; local PHP debugging only) - Define the INI and interpreter for Komodo

To debug PHP programs locally, start Komodo and edit the Preferences. Make sure that a PHP executable is selected.

  1. From the Edit menu, select Preferences.
  2. In the Preferences dialog, click PHP.
  3. In the Use This Interpreter field, Komodo will provide a list of PHP interpreters found on your system (if they are located in directories included in the system's PATH variable). Select the desired interpreter from the list, or enter the path and name of the desired interpreter (if it is not located on the PATH), or click Browse to search for a PHP interpreter.
  4. In the PHP Configuration Path section, enter the directory where the php.ini file resides, or click Browse to search for the file. This setting is OPTIONAL. This is useful if you want to use separate .ini files for debugging and general use.
  5. Click OK.
Top

I'm having trouble debugging PHP. What do I do?

If you have attempted to debug a PHP script and received an error message, there are a few things you can verify prior to contacting ActiveState's technical support.

Confirm PHP Configuration

  1. ActiveDebugger: in the command or shell window, enter php -m. "Active Debugger" should be listed as both a regular module and a zend extension. If this is not the case, your configuration is incorrect. See "Common PHP Configuration Problems" below.
  2. Syntax Checking: in Komodo, select Edit|Preferences. Click on Smart Editing, and ensure that "Enable background syntax checking" is checked. Open a PHP file and enter something that is syntactically incorrect, such as:
    <?
    asdf
    echo test;
    ?>
    
    Komodo should display a red squiggly line under echo test;. If it does not, it indicates that Komodo is not able to communicate with the PHP interpreter.
  3. Debug: if steps one and two were successful, ensure that the debugger is functioning by opening a PHP program and debugging it. Ensure that the correct Preferences are configured for PHP.

If any of the steps above were unsuccessful, proceed to the next section.

Common PHP Configuration Problems

  • Multiple PHP executables on one machine: in Komodo's Preferences, explicitly specify the PHP interpreter configured in your php.ini file. If you are running Komodo version 1.2 or higher, you can also explicitly select the location of the php.ini file.
  • Verify the PHP version: Komodo 1.2 and higher includes support for PHP versions 4.05, 4.0.6, 4.1.x and 4.2.x.
  • Verify DLL locations: The file "activedebug.dll" must be located in the directory specified in the "extension_dir" variable in the php.ini file, for example:

    • Windows: c:\php\extensions
    • Linux: /usr/local/lib/php/extensions

  • Verify php.ini file specifications Ensure that your php.ini file specifies the correct location for the extension directory. By default, the php.ini file is located as follows:

    • Windows: c:\winnt
    • Linux: /usr/local/lib/php

    Ensure that the variable extension_dir in the php.ini specifies the correct directory for php extensions, as shown below:

    • Windows: extension_dir = c:\php\extensions
    • Linux: extension_dir = /usr/local/lib/php/extensions

    Ensure that the following variables are specified in the php.ini file:

    • extension=activedebug.dll
    • activedebug.enabled=1

Windows-Specific Configuration Issues

  • Confirm "SYSTEM PATH": if you are using and PHP 4.0.x and ISAPI.dll, or the Apache.dll if PHP is run as a system service, ensure that the directory containing the file "xerces-c_1_4.dll" is specified in your SYSTEM PATH, as opposed to your USER PATH. ("xerces-c_1_4.dll" should be located in the directory C:\PHP.) For example, on Windows 2000, right-click the "My Computer" icon on your desktop and select "Properties". On the "Advanced" tab, click Environment Variables. Ensure that the directory C:\PHP is included in the "PATH" variable in the "System variables" section. If necessary, re-start your Web server.
  • Windows 2000 upgrade: if you upgraded to Windows 2000 from an earlier version of Windows, check the value of the "COMSPEC" variable in the "System variables" (as described above). It should point to C:\WINNT\system32\cmd.exe, and not command.com. If you must change the variable, reboot your system.
  • There are known issues regarding the installation of PHP on Windows Millennium systems; please refer to the PHP site for installation information.

Linux-Specific Configuration

  • activedebug.so: the file activedebug.so must be located in the directory defined in your php.ini file for the variable extension_dir.

Version Error Messages

If you receive a dialog with the following text:

Warning
Active Debugger: Unable to initialize module
Module compiled with debug=0, thread-safety=1 module API=20001222
PHP compiled with debug=0, thread-safety=1 module API=20001222
These options need to match

you need to download an updated version of the activedebug.dll (Windows) or activedebug.so (Linux) from the Komodo Remote Debugging page.

Top

How do I configure Virtual Hosting on an Apache Web server?

Virtual Hosting is an Apache feature for maintaining multiple servers on the same machine, differentiating them by their apparent hostname. For example, a single machine could contain two servers, "www.yourdomain.com" and "debug.yourdomain.com".

If you have configured your Apache installation to use Virtual Hosting (see httpd.apache.org/docs/vhosts/), you can add directives to your VirtualHost sections to specify how Komodo's PHP debugger extension operates for those hosts. Use the "php_admin_value" to set specific debugger settings for that virtual host. Here is an example:


NameVirtualHost *
<VirtualHost *>
php_admin_value activedebug.enabled 0
DocumentRoot "/Apache/htdocs/"
ErrorLog logs/www.error.log
Servername www.yourdomain.com
</VirtualHost>

<VirtualHost *>
php_admin_value activedebug.enabled 1
DocumentRoot "/Apache/htdocs/"
ErrorLog logs/debug.error.log
Servername debug.yourdomain.com
</VirtualHost>

This will enable debugging under debug.yourdomain.com, but not under www.yourdomain.com. You can additionally configure the Virtual Host to use a specific machine for remote debugging:


<VirtualHost *>
php_admin_value activedebug.enabled 3
php_admin_value activedebug.host komodo.yourdomain.com
DocumentRoot "/Apache/htdocs/"
ErrorLog logs/debug.error.log
Servername debug.yourdomain.com
</VirtualHost>

For more information on configuring Virtual Hosting under Apache, see the Apache documentation at httpd.apache.org/docs/.

I moved my Komodo installation on Linux, and am now getting Perl debugging errors.

On Linux, you cannot relocate an existing Komodo installation to a new directory. You must uninstall Komodo from the existing location and reinstall it in the new location. See Uninstalling Komodo on Linux for instructions.

Top

How do I prevent the dialog from displaying every time I start the debugger?

To prevent the debugger dialog from appearing each time you start the debugger, hold down the Ctrl key when you start the debugger. (For example, press Ctrl+F5 rather than F5 to start debugging.)

Top

Can I run Komodo on Debian?

Although it is not an officially-supported operating system, some users have successfully run Komodo on Debian. If, when trying to run Komodo on Debian, you are presented with an "error while loading shared libraries" message, try installing a Debian library package with this command:

apt-get install libstdc++2.9-glibc2.1

The associated filename for this apt-get command is:

dists/potato/main/binary-i386/oldlibs/libstdc++2.9-glibc2.1_2.91.66-4.deb

Also, because some Komodo components depend upon libdb.so.2, before installation, you may need to create a symlink from this file to the Debian installs that call libdb-<version>.so. You may also need to experiment with libdb1-<version>.so symlinks.

Top

Can I run Komodo on Gentoo?

Although it is not an officially-supported operating system, some users have successfully run Komodo on Gentoo. Komodo requires the lib-compat package, which can be installed with the following command:

emerge lib-compat
Top

Why do I get a CGI security alert when debugging PHP?

The CGI security alert only occurs when you compile PHP with --enable-cgi-force-redirect. That compilation directive forces PHP to check if it is being run as a CGI by looking at environment variables commonly available only under a CGI environment. If they exist, it looks for another environment variable that is reliably available ONLY under Apache, REDIRECT_STATUS (or HTTP_REDIRECT_STATUS under Netscape/iPlanet). If that environment variable does not exist, the security alert is generated.

To run your compilation of PHP under Komodo with CGI emulation, you have to add a CGI environment variable called REDIRECT_STATUS with any value.

Top

Why does "php -m" list Active Debugger as PHP Module and not a Zend Module?

There is a bug in PHP 4.1.x where no zend module listings were being displayed.

Top

When I use XSLT extensions, Komodo reports missing Java extensions and debugging fails.

Komodo uses the C++ version of the Apache Foundation's Xerces and Xalan libraries for its XSLT engine. Although these support EXSLT extension, they do not support java extensions.

Top

I'm using Windows 98. When I start Komodo, I get the error "Page fault in MSVCRT.DLL".

If your system generates the above error when starting Komodo, you should install the latest "critical" fixes for Windows 98. Use the Windows Update utility to download and install the upgrade packages, or refer to the Microsoft Support Web site.

Top

When I click Check Configuration on the Start Page, Komodo reports that a language that is installed on my system is not available. Why?

In order for Komodo to detect the presence of a language installed on your system, the location of the language interpreter must be specified in your system's PATH environment variable. If the Komodo Start Page states that a language is "Not Functional", or if the Komodo Preferences say that the language interpreter is not found on your system, check that the interpreter is specified in your PATH.

Top

My screen goes black for a second or two whenever I open files for which Komodo performs background syntax checking. Why?

Komodo launches a process as part of the background syntax checking that can cause a full screen command prompt to momentarily appear on some Windows systems. You can make the process invisible by editing the properties for the command prompt window. On the Windows Start menu, right-click the Command Prompt item, and select Properties. Select the Options tab, and change the Display options to Window.

Top