



I have a particularly thorny problem with using nose under Komodo -- there is a strange behavior that causes some unit tests to pass when they shouldn't, and it's only when I use the nose API from within my extension.
Is there a way to invoke pdb and step through what's happening in the nose code from within my extension? (perhaps with the Extension Developers Extension?) Or do I have to resort to logging within the nose code itself?
My extension does the following in order to call nose:
JS code -> PyXPCOM code -> nose API
Any advice/best practices welcome.
Thanks,
Brandon
It is certainly possible to debug the Python code that is running inside of Komodo, though I'm not sure about using pdb (as I'm not sure about interaction and UI side of things). I occasionally will debug one Komodo session with another Komodo instance though. Here are some steps I use to achieve this:
# This is port "Komodo" is listening on
dbgp.client.brk(host="localhost", port=9000)
Cheers,
Todd
Will this work with Komodo IDE 3.5? That's the only IDE version I have.
If your running Komodo Edit for "KomodoNose" above, then yes this should work. I'd recommend not copying the dbgp files across to the "KomodoNose" installation, instead use the following code to setup the breakpoint:
DBGP_PATH = "/Komodo-Pro-3.5/lib/support/dbgp/pythonlib"
if DBGP_PATH not in sys.path:
sys.path.append(DBGP_PATH)
import dbgp.client
dbgp.client.brk(host="localhost", port=9000)
import sys DBGP_PATH = "/Komodo-Pro-3.5/lib/support/dbgp/pythonlib" if DBGP_PATH not in sys.path: sys.path.append(DBGP_PATH) import dbgp.client dbgp.client.brk(host="localhost", port=9000)Cheers,
Todd
Todd, that works great; unfortunately only with Komodo IDE 4 though. Hopefully the 21-day trial lasts long enough for me to debug my problem!