Enable debugger in code

I wanted to start debugging in the middle after I do bunch of stuff . How do i do that .

for e.g

import harry as x

x.setup()

since , setup takes long time, i like to start debugger after setup is done. This is possible in othe rIDE.

Hi @Sujit_Pant,

Assuming Python.

I don’t know what platform you’re on.

And yes this is possible. You can set a breakpoint after x.setup().

Otherwise you can use this remote debugger trigger: http://docs.activestate.com/komodo/9.0/debugpython.html#Invoking_the_Python_Remote_Debugger

  • Carey

I am on windows.
If i put breakpoint after setup, it still take much longer than if i execute from command line.

I was trying out wingide, it seem to be faster for this scenario.

This is the method you would use for this scenario. I can’t imagine WingIDE does it differently. If they do, could you please elaborate?

  • Carey

Starting debugger later is possible within Komodo - using the remote debug method, where you manually set a breakpoint in the code, like this:

import harry as x
x.setup()
from dbgp.client import brk
brk() # optional args, defaults to: host=''127.0.0.1", port=9000

Then, to start from within Komodo IDE, use the Debug > Run without Debugging menu - which will start running without the debugger, until it hits the brk() line, when it will then establish a debugging connection.

Cheers,
Todd

Thanks !! It worked and this is what i was looking for .