Can't debug paramiko code in Komodo IDE

When I run this paramiko code in Komdo IDE 8.5.4 on a Mac, it fails. When I run the same script from the command line, it runs fine. What do I need to do to test paramiko code in Komodo?

To me it looks like Komodo is being fooled into thinking it is debugging code on a remote host.

import paramiko, os
print os.sys.platform, os.sys.version
print “Paramiko”, paramiko.version
# Komodo IDE version is 8.5.4
client = paramiko.SSHClient()
client.connect(‘’) # use a real ssh server name

When run in the debugger, this is the output

darwin 2.7.5 (default, Mar  9 2014, 22:15:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
Paramiko 1.15.1
dbgpSocket: error: unable to connect to remote host at

Unhandled exception in thread started by <function _dbgp_start_new_thread at 0x108923758>
Traceback (most recent call last):
  File "/Applications/Komodo IDE", line 3847, in _dbgp_start_new_thread
    client.connect('', 9000, name)
  File "/Applications/Komodo IDE", line 2313, in connect
  File "/Applications/Komodo IDE", line 2161, in connect
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 61] Connection refused

If I turn on ‘Listen for Debugging Connections’ under Debug then output changes to this

ERROR: dbgp.client: 
The main thread of this application is exiting while there are still threads
alive. When the main thread exits, it is system defined whether the other
threads survive.

See Caveats at

The Caveats link returns a 404 error.

That looks like things are working (in the second set of output)… perhaps you should set a breakpoint in there somewhere so Komodo will stop (instead of finishing the application).

Okay, I turned on “Listen for Debugging Connections” and stepped through my real program, not the little sample I uploaded, and it works. Why is this? From the first error it looks like it’s trying to connect on a localhost connection.

Can I leave “Listen” on set all the time and forget about it and lead a happy life? I only lost about an hour trying to debug my code before I discovered it runs fine from the command line.

I thought that was only to facilitate testing when the code and the IDE are on different machines. Or something like that.


re: Debugging Connections

Komodo will always use a socket connection, even when debugging locally on the same machine. It’s because the Python/Paramiko process is completely separate to Komodo, so it needs a way to communicate back to Komodo, which it does so through this Debugging socket connection.

You’ll can leave it enabled by default and enjoy a happy life (from now anyway ;)).