komodo

Start Komodo with Clean Profile

Question: 

How can I easily start Komodo with a clean profile?

Answer: 

Sometimes when you're using Komodo you may run into issues or want to see what your default settings were many customizations later.

In either case, you or the Komodo dev team will want you to start Komodo with a clean profile. One way is to manually move your profile aside using the instructions provided in another general FAQ post about Komodo File Locations.

Another easier and less error prone way is to use the KOMODO_USERDATADIR environmental variable:

  • Stop Komodo if it is running (this is optional, the following allows you to running multiple instances of Komodo)
  • Open a command line or Terminal window
  • Set KOMODO_USERDATADIR to a path of your choosing. eg.

     

    set KOMODO_USERDATADIR=%TEMP%\ko #Windows

    or

    export KOMODO_USERDATADIR="/tmp/ko" #unixy

  • Start Komodo from the same commandline window, eg  /path/to/komodo (or just komodo if it's on your PATH).

Komodo will then start with a completely clean profile with all default settings.

- Carey

Komodo License not Working

Question: 

Why won't Komodo allow me to do the 21 day trial? Or let me use my actual license?

Answer: 

If you're having trouble starting your Komodo trial or it won't pick up your freshly purchased and installed license, there are a few things you can try to work around the issue:

Trial Issues:

  • A. Download a new Komodo installer and reinstall Komodo
  • C. Contact support@activestate.com and tell them you're trial license won't start and they should be able to help.

License Installed but not Used:

  • A. Download a new Komodo installer and reinstall Komodo
  • C. Do the same as the last step but also download your license installer again from account.activestate.com
  • D. Contact sales@activestate.com and tell them you're license won't work and they should be able to help.

Note:
- If you already have a previous Komodo license you are STILL ENTITLED to a Komodo trial of whatever the new version is.

Where do I post questions about Komodo?

Question: 

I can't find a place to post my Komodo questions any longer. What happened? Should I post in some other forum?

Answer: 

The Komodo Forums have moved to a shiny new home!

Please head over forum.komodoide.com, sign up to get a fresh user ID, and post your topics!

Off-topic posts entered in the Website forum, the Licensing forum, or the individual Languages forums cannot be transferred to the new Komodo forum. Another forum should only be used if your questions directly involve those topics.

Komodo Tab Side Panes

Question: 

What happened to my tabs in the side Pane? Why do they look like massive columns?

Answer: 

With the slick new updates to the Komodo IDE UI, a problem has arisen when you switch Komodo IDE 8a side pane tabs to "Icon in tabs" under Preferences->Appearance->Left/Right pane layout.

This gets Sync'd to your Komodo IDE 7 profile as well. Komodo IDE 7 has no idea what you're talking about and reacts accordingly; it creates tabs the size of index fingers (window height and personal anatomy dependent).

This is easily remedied. First turn off Sync in Komodo IDE 8a once you have imported all your settings. Then simply revert the changes to your prefs. Preferences is under the Komodo menu option on OS X and under Edit in Linux and Windows.

Have a great holiday!

- Carey

Custom Break Points in Komodo

Question: 

How do I set and understand Komodo custom break points?

Answer: 

To SET a custom breakpoint in Komodo you simply right click on the line you want the breakpoint to be on then select "Add/Edit Breakpoint". That's the easy part.

For customizing custom breakpoints, take a look at Komodo Breakpoint Properties documentation.

Here is my explanation and some examples of each tab.

Conditional

With a Conditional breakpoint, you set an expression that when it evaluates to true, the script will break. For the following I will set the Condition field to a%2==0

a = 0
while a < 10: #it will break here when a is 0,2,4,6,8,10
    a += 1    #you can see this in the Locals debug tab

NOTE: If you were to set the Hit Count field to "Break when hit count is a multiple of: 2" in the File tab when editing the breakpoint, you would get the opposite, eg. 1,3,5,7,9.

Watch

Watch a variable and stop when it changes

a = 0
print a
while a < 3:
    if a % 2 == 0:
        pass
    else:
        a += 1
    print a  #This will NOT break the first loop through the while.
    a += 1

Function Call

Break when the specified function is called before the breakpoint.

 
def foobar():   #breakpoint will break here at function start
    print "foobar will return :|"
a = 0
print a
while a < 10:
    if a % 2 == 0:
        a+=1
    else:
        print "foobar's going to run! WOOH!"
        foobar()
        a += 1

NOTE: Red dot will not appear for either Function style or Exception style breakpoints. Check breakpoints tab in bottom pane to see them.

Function Return

This is similar to Function Call, only it stops when the function returns. In the above example it would break at the last line of the function, ie. print "foobar will return :|"

And finally,

Exception

This type will break when an Exception is hit in your code and you have written code to handle that Exception and allow the script to continue running. In this example you would write TypeError in the Exception text field under the Exception tab.

a = "0"
try:       #Without an Exception breakpoint, this will run
    a += 1 #With an Exception breakpoint, it will stop here
except:
    a = 0
print a

Hope that helped.

Cheers,

- Carey GC Hoffman

Node.js debugging just stopped in Komodo when it was working 5 minutes ago!

Question: 

Why won't my Node.js debugging work in Komodo any more?

Answer: 

Node.js was original designed with Posix systems in mind. It uses network calls not available on Windows systems. There was a port done in the open community which is not quite complete so sometimes processes are left running. The debugger thinks it has shut them down but it hasn't.

If you're node.js (or javascript) debugging stops working properly on your Windows machine your problem is most likely that some Node servers have been left behind. This will occur if you prematurely kill the debugger session.

Open your Task Manager and kill any node.js processes still running.

- Carey

Komodo and PHP 5.4 Debugging Not Working

Question: 

Why isn't Komodo working with my PHP 5.4 install?

Answer: 

Komodo 7.0.x is not compatible with PHP 5.4 yet. The new php_xdebug.* has not been release in the 7.0.x series.

You can either revert to PHP 5.3 until Komodo 7.1 is released

OR

Download the Komodo Nightly build which has the new php_xdebug.* file which is PHP 5.4 friendly. You can download the nightly here.

If you're still having problems getting PHP to play nice with Komodo you may not have PHP fully configured. That's covered over here.

PHP Debugging on Windows 7 in Komodo in 5 Minutes.

Question: 

Komodo won't use my PHP install for debugging! Why?

Answer: 

WARNING! Failed to configure PHP debugging.
WARNING! Could not determine PHP version number.

You might have seen these errors before. You were installing PHP on your system and trying to run it in Komodo. This FAQ is to help you jump some configuration hurdles. It's easier than you think...

  • Download and unpack the Zipped PHP to your machine. I put it in C:\php\.
  • Configure Komodo to use PHP interpreter or put it on the PATH.
    • Direct Komodo to the PHP interpreter:
      • Edit->Preferences->Language->PHP:Use this interpreter.
      • Click Browse.
      • Navigate to the folder you unzipped PHP into.
      • Select php.exe and click Open.
      • Komodo will configure and let you know that Debugging is ready.
    • Add C:\php\ to your system PATH.
      • To confirm that PHP has configured properly using the System Path variable click Check Configuration on the Komodo Start page. PHP should get two brand new green check marks

There you go. Now start writing some PHP!

NOTE: You do NOT need the Debug Pack download for debugging in Komodo. Just download the Zip.

I Lost my Komodo Key! How do I reset it?

Question: 

How do I reset my Komodo Sync Key? I seem to have misplaced it.

Answer: 

You can remedy this problem by typing some random characters in the text box that you would normal paste your Komodo Key into then click "Next".

This will present an option to reset your Komodo Key.

Steps:

- Tools->Set Up Sync...->Next
- If you haven't already...Enter email and password -> Next
- Enter 'I have no idea." in the text field->Next
- Click "I have lost my Sync Key"

This will be fixed very soon.

Komodo from the command-line

Question: 

How do I use Komodo from the command-line?

Answer: 

First, add it to your system PATH or create an alias. These examples use Komodo IDE 6.0, but you can modify them for any version.

  • Windows users: komodo.exe should be added to the PATH during installation.
  • Linux users: you can either add Komodo's 'bin' directory to your PATH:

    export PATH=$PATH:/opt/Komodo-IDE-8/bin

    ...or create a symlink as suggested at the end of the installation process:

    ln -sf /opt/Komodo-IDE-6.0/bin/komodo $HOME/bin/komodo

  • OS X users: use the 'alias' command:

    alias komodo='open -a "Komodo IDE 8"'

  • ... or alternately, you can also specify the path to the application like this:

    alias komodo='open -a "/Applications/Komodo IDE 8"'

You should then be able to start it from a shell or console. If Komodo is already running, a file given as an argument will be opened in the existing instance in a new tab:

komodo ~/this/that/myfile.py

There are additional options. These options will only work with Mac if used on the full path command for Komodo. They will not work with the alias created above. Running komodo --help gets you:

Komodo IDE 6.0 -- ActiveState's cross-platform multi-language IDE

Komodo IDE is cross-platform integrated development environment
with a rich feature set for client-side Ajax languages such as
CSS, HTML, JavaScript and XML, coupled with advanced support for
dynamic languages such as Perl, PHP, Python, Ruby and Tcl.

Usage:

    komodo [options] [...]

Options:
    -h, --help   	show this help and exit
    -V, --version	print the Komodo version and exit
    -v, --verbose	show verbose startup and runtime info

    -n, --new-window	open a new Komodo window
    -l , --line=
        Open the given file(s) at a specific line; use
        , to open at a specific line and column.
        Alternatively, a line can be specified with a 
        pseudo-HTML-anchor syntax, e.g.: 'komodo myscript.pl#42'
        will open 'myscript.pl' at line 42.
    -s , --selection=
        Select a specific range in the given file(s);
         must be one of the following forms:
            1,5-2,15	select from line 1 and column 5
                    	to line 2 column 15
            15-22   	select from character 15 to 22

So specifying a line number with a file would look like this:

komodo -l 42 ~/this/that/myfile.php

Alternatively, you can use a pseudo-HTML-anchor syntax:

komodo myscript.pl#42

This will open 'myscript.pl' at line 42. If you want to get fancy, you can even specify a selection range:

komodo -s 1,0-43,0 ~/this/that/myfile.php