I have the remote python debugger set up as per the documentation and can successfully connect to the Komodo IDE. However what seems to happen when I run the command on the remote server is that the script under test executes on the remote server and then, once it’s complete but before exiting, it connects to the listening port on Komodo which then enters debug mode and recognises the script in a break state but at the end of the script having passed all the breakpoints.
I’m left scratching my head on how to resolve this.
Hey @neilneil2000,
I’m not sure how you’re coming to that conclusion so I’m not sure how to help. What are you seeing that causes you to come to that conclusion?
Helpful info to share:
Hi, thanks for getting back to me. My starting point for everything has been the Komodo 12 documentation here
I’ll start by saying I do now have it working using the from dbgp.client import brk and brk(host="Komodo_IDE_IP", port=9000) commands within a python script. That all seems to work as expected - I execute the script on the remote device and then at the brk() command the local IDE instance recognises the connection and moves into debug mode and I can then step over/in/out etc as expected.
The issue I am having is if I attempt to use the python -S **path/to/**pydbgp.py -d **host:port** **your-script.py**
method
When I execute that command I can see the script start executing (via some print statements) and then only when the script has reached the end does the Komodo IDE on the local machine recognise there’s a connection for a debugging session. It then shows at the top “Debugger is in break mode”. The debugger definitely is connected at this point and a Ctrl+C in the remote terminal doesn’t result in the script ending, for that I have to click the stop icon in the debugger. I have tried adding pauses in my code and the very last line is now print("Program Ends"), so I am confident that the connection is occuring after the script executes.