How to prevent freeze-ups on dual-core Windows machines


I run Komodo on a dual-core Windows machine. Occasionally after running a Perl program, either inside the debugger or outside, Komodo will freeze up. This seems to happen whether the CPU is Athlon or Pentium, it doesn't seem to matter.


The key is to open the task manager, select the komodo.exe process, right-click
it using the "set affinity" function.

Remove the checkmark from all but one CPU and komodo will work fine.

Thanks to community contributor JTa for working this out.

You can track this bug at

Mini-faq: how to debug Expect with Tcl


While trying to debug an expect program, I get tracebacks referencing functions that start with "DbgNub". What should I do?


Usually this problem can be resolved by running the program with the
tclsh interpreter, not expect, and ensuring the code contains this

package require Expect

Replacement Tcl linter binaries


I get an error 'Invalid License' when editing Tcl code in Komodo 4.1. What's going on?


Komodo 4.1.0 shipped with a Tcl linter binary that incorrectly checks for a license. To fix this, please replace the 'kotcllint' binary in your Komodo installation ( kotcllint.exe on Wiindows ) with one from the attached zip archive.

To install, unzip the attached file and copy the kotcllint or kotcllint.exe file for your OS to the following path overwriting the existing file:

C:\Program Files\ActiveState Komodo IDE 4.1\lib\support\tcl\ ( Windows )

/opt/Komodo-IDE-4.1/lib/support/tcl/ ( Linux )

/Applications/Komodo IDE.app/Contents/SharedSupport/tcl/ ( OS X )

This issue will be fixed shortly in the upcoming Komodo 4.1.1 release.

An easier way to manage language-specific indent levels


How do I get Komodo to use language-specific indentation levels? We use 2-space indentation for Ruby and HTML, 1-space for XML, and 4-space for everything else.


Time for another one of those tips to play with this weekend...

There are various internal reasons why Komodo doesn't have language-specific
indentation settings, but that hasn't stopped many people from asking for them.

However, this is a snap to implement with Komodo's trigger macros. Create
a new macro, and do the following:

1. Press the Triggers tab

2. Check "Macro should trigger on a Komodo event"

3. Select the "After file open" radio button.

You can have more than one trigger macro on a given event. The lower
the assigned rank, the later it fires. Your macros can even define
variables and functions into Komodo's global namespace, so an early-firing
macro could set a value that a later-firing one could use.

4. Finally, this code will control the indentations on load:

var language = komodo.document.languageObj.name;
// alert("Doc language = " + language );
var indentWidth = null;
switch(language) {
    case 'XML':
        indentWidth = 1;
    case 'Ruby':
    case 'RHTML':
    case 'HTML':
        indentWidth = 2;
if (indentWidth) {
    komodo.document.indentWidth = indentWidth;

The only problem with this trigger is that if you choose a
different indentation for a particular buffer, it will be
reset to the language default every time you load it.
I'll have to figure that one out.

codeintel CIX schema


What is the schema for CIX (codeintel XML)?


CIX stands for Code Intelligence XML. It is the XML format that is used to describe codeintel information for programming language content (variables, classes, functions, etc.) in Komodo's Code Intelligence system. This format is used by the internal scanners of Python, Perl, PHP, JavaScript, Ruby, etc. code. It is used to define the standard library data and API catalog data for these languages.

Attached are the CIX schema (in RelaxNG) and a small catalog.xml (XML catalog file) that can be added in Komodo's "Languages > XML Catalogs" table to get XML autocomplete for .cix files.

All .cix files should start out like this:

<?xml version="1.0" encoding="UTF-8"?>
<codeintel xmlns="urn:activestate:cix:2.0" version="2.0">

Komodo file locations


Where can I find the Komodo files?


Where is Komodo installed?

The default location varies by platform, and the name of the directory corresponds to the version of Komodo you are running ("IDE" or "Edit" plus the version number - e.g. "Komodo IDE 8"):

  • Windows
    C:\Program Files\ActiveState Komodo [IDE|Edit] <version>\
  • Linux
  • OS X

Where does Komodo keep settings data?

Komodo stores preferences, macros, templates, keybinding schemes and other settings in a user-specific directory called the user data directory. The name and location of this directory varies depending on the operating system and Komodo version:

  • Windows Vista, Windows 7, Windows 8 or newer
  • Windows XP or older
    C:\Documents and Settings\<username>\Local Settings\Application Data\ActiveState\Komodo[IDE|Edit]\<version>
  • Linux
  • Mac OS X
    /Users/<user>/Library/Application Support/Komodo[IDE|Edit]/<version>

You can find more details about the contents of the profile directory here:

The location of this directory can be overridden using the KOMODO_USERDATADIR environment variable, see:

Where does Komodo log output and errors?

Note: In Komodo 6, you can use the "Help->Trouble Shooting->View log file" menu command to quickly examine Komodo's main log file ("pystderr.log").

There are two files named "pystderr.log" and "pystdout.log" within your Komodo user data directory. These files are extremely useful for troubleshooting problems with Komodo and are often requested when logging bug reports.

  • Windows Vista, Windows 7, Windows 8 or newer
  • Windows XP or older
    C:\Documents and Settings\<username>\Local Settings\Application Data\ActiveState\Komodo[IDE|Edit]\<version>\pystd[err|out].log
  • Linux
  • Mac OS X
    /Users/<user>/Library/Application Support/Komodo[IDE|Edit]/<version>/pystd[err|out].log

How do I reset Komodo's preferences to the default settings?

Warning: This will reset a lot of preference information, including opened files, recent files, projects and toolbox, additional installed extensions, customized Komodo preferences, etc... So make sure you backup the folder instead of simply deleting it, this way you can easily restore your settings.

Your preferences should be reset.

Note 1: If you have older Komodo preferences from before Komodo 4.0, these will be applied on-top of the default preferences as part of a Komodo upgrade process, so for a total default/fresh set of preferences you will need to rename the older komodo directory as well.

Note 2: You can also use a completely different Komodo user data directory, see below.

How can I change Komodo's profile storage location

You can use a completely custom Komodo user data (profile) directory by setting the KOMODO_USERDATADIR variable in your environment settings before starting Komodo.

export KOMODO_USERDATADIR=/tmp/komodoide

Komodo Port Usage


My [insert security company here] software Firewall is reporting that Komodo is engaging in 'suspicious activity' or is a Trojan. What is going on here?


We've always used socket connections, and have occasionally had problems with Security software returning a false positive. Komodo uses ports for the following reasons:

- the debugger ( typically port 9000, but user-configurable )
- the start page has an iFrame that displays a page on our site.
- ssh / sftp / ftp editing
- the html perview, if you open a url

It is almost always the debugger that is the problem because the other features all use 'standard' ports for relatively well-known protocols. Komodo does not have any kind of spyware in it, so my best suggestion is to configure your software to allow Komodo to make these connections.

CGI Debugging: 'No Input File specified'


When I try to debug PHP using CGI Emulation, I get this error:

No input file specified.


This is because your PHP CGI interpreter has been compiled with cgi.force_redirect set to on for security reasons. We can fix this in Komodo by changing this setting in the copy of php.ini that Komodo uses:

- open the php.ini copy that Komodo is using:


- change the setting:

; cgi.force_redirect = 1


cgi.force_redirect = 0

Save the php.ini, then try debugging using CGI Emulation again.

Customizing the Komodo UI


How can I change the UI widgets and the look and feel of Komodo? Like:

  • Tabs
  • Menus
  • Toolbar buttons
  • Internal browser
  • Editor
  • etc...

Komodo XUL UI

You can customize most of the (xul) UI by creating your own customized "userChrome.css" file, stored in your Komodo profile. See this forum post for where your Komodo profile is located:

You need to make a sub-directory "chrome" in the Komodo profile's "XRE" folder. Then create the file "userChrome.css", which will contain your customized (overide) settings. The full file pathname should be similar to this on a Windows XP machine:

C:\Documents and Settings\<your_username>\Local Settings\Application Data\

Here is a sample userChrome.css file that overrides the tab colours to be a darker shade of grey (active one even darker), provide rounded corners on the tabs and make the text of the selected tab bold:

/* Customized setting for override the selected editor Tab colors */

/* Tabbox background */
tabbox, tabs {
    background-color: #ddd !important;

/* Tab background and visuals */
tabs > tab {
    background-color: #D3D3D3 !important;
    border-width: 1px !important;
    border-color: black !important;
    /* Rounded tabs */
    -moz-border-radius: 3px 3px 0px 0px !important;

/* Hovering over tab, change background and font color */
tabs > tab? {
    background-color: #ccc !important;
    color: #fff !important;

/* Active tab including hovering, change background and font weight */
tabs > tab[selected="true"], tabs > tab[selected="true"]? {
    background-color: #ccc !important;
    font-weight: bolder !important;

/* Sample to update all the trees inside komodo for white on black theme. */
treechildren::-moz-tree-row /* for Komodo 7 */
    background-color: #000 !important;
    color: #fff !important;

/* Change the document toolbar to use a white on black theme. */
.view-toolbar {
    background-color: #000 !important;
    color: #fff !important;
    /* or to hide it completely using:
    visibility: collapse;

/* Set font size and family for dialogs and other miscellaneous text */
window, dialog {
  font-size: 100% !important;
  font-family: helvetica !important;

/* Make menus big, pretty and readable */
menubar, menubutton, menulist, menu, menuitem {
  font-family: helvetica !important;
  font-size: 4mm !important;

For more examples, take a look at the mozilla/firefox userChrome.css documentation, as it's the same as Komodo, except for the id used in some xul elements.

Mozilla Config

You can edit the mozilla configuration settings using the "about:config" url, same as in Firefox and Thunderbird. You can easily get to this editor by

  • Open a file in the Komodo editor
  • Perform a Preview with Browser command (ctrl+K, ctrl+V)
  • In the dialog window, select preview with another file or URL and change the textbox url to be "about:config"

Internal Browser

You can use the same method as Mozilla/Firefox uses for overriding browser content as well, by creating your own customized "userContent.css" file, located in XRE directory in your Komodo profile (see above).

hr {
    background-color: #ffffff !important;
    color: #ffffff !important;

span, p, ol, td, th, h1, h2, h3, h4, h5, h6 {
    background-color: #000000 !important;
    color: #ffffff !important;

This example overrides most of the contents to use a black background and a white foreground.

Komodo Editor UI

Komodo's editor is based on the Scintilla editing component. Komodo provides preferences for most of the parts that are customizable, although there are a few less obvious ones that are missing. If you need to do your own custom settings (i.e. different settings for different file types), then you can create a macro in your Komodo toolbox that is set to run "triggers" on the file load event.


// Example JS macro
// Set the trigger to run on file load through the macro editor
// Example to change calltip colours to use black bg, white fg.
if (komodo.editor) {

Once created, you can also run this macro code on demand by simply double-clicking.

How do I find out about other editor/scintilla calls:

  • create a new JavaScript file inside Komodo and type (Komodo 4.2 onwards):
  • open the scimoz IDL "ISciMoz.idl" file in the sdk directory (Komodo 4.1 onwards)
  • see Komodo's internal help
  • check out the scintilla website

Project info from Python macro?


How do I get information on which files that are highlighted within the Project pane, via a Python macro?


Right now you have to do this in JavaScript, since the only way to access some of the UI is through JS. Eventually that will change, work has been done in the Firefox 3.0 branch to make Python work in the UI layer. In JavaScript do this:

var selectedItems = gProjectManager.viewMgr.getSelectedItems();

"selectedItems" is now an array of koIPart instances (XPCOM objects). If you want file information, you can to the following:

var f = selectedItems[0].getFile(); // f is a koIFileEx instance

There are a number of other members on the file instance as well.