Search code examples
pythonc++linuxwinpdb

Debugger is not detaching from Winpdb


I am using PythonQT to execute python script (because I need to call c++ methods from python script)

My winpdb version is 1.4.6 and machine is CetOS 6.5

Now I want to enable debugging in python script

I have added rpdb2.start_embedded_debugger('test') inside the script and called PythonQt.EvalFile() function, now script is waiting for debugger.

I have opened winpdb UI from terminal and attached to the debugger. I am able to do the “Next”, “Step into” etc. and all local variables are visible correctly But when I am trying to detach the debugger it is not detaching. Status showing “DETACHING” and nothing happening and I cannot even close winpdb. The only way to exit is kill winpdb.

If I run the same script file from terminal it is working properly (python ) and detaching as expected.

By looking the logs I have found that ,If I run from terminal then the debug channel is encrypted but when from PythonQt debug channel is NOT encrypted, not sure this have any relation with detaching

By further looking into rpdb2.py code I have found that Winpdb is hang on the line self.getSession().getProxy().request_go(fdetach) of request_go(self, fdetach = False): in rpdb2.py

The port 51000 is still in established mode

Please advise me on this.


Solution

  • Finally i have fixed the issue by using the latest version of python QT