pydev debugger is not connecting
Dear PyCharm gurus,
Working on my Mac Pro with python 2.7 through MacPorts, I got this new issue while running pydev into PyCharm:
/opt/local/bin/python "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 56411 --file /Users/marquett/PycharmProjects/DGDF2014/run_flux2mag.py KOT-2099-VVV-0305.cfg
pydev debugger: process 98818 is connecting
Connected to pydev debugger (build 162.1967.10)
Could not connect to 127.0.0.1: 56412
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1572, in <module>
debugger.connect(host, port)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 319, in connect
self.initialize_network(s)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 311, in initialize_network
time.sleep(0.1) # give threads time to start
KeyboardInterrupt
Process finished with exit code 1
Note the argument --port 56411, while "could not connect to 56412". I guess this shift of +1 could be relevant to that issue.
I use:
python --version
Python 2.7.12
uname -a
Darwin macprojb.iap.fr 15.6.0 Darwin Kernel Version 15.6.0: Thu Sep 1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64 x86_64
Thanks for your help,
JB
Please sign in to leave a comment.
In my case what worked was delete all debugging breakpoints.
Hi, I am having the same issue with python 2.7.12 but in different lines...
This is the Trace
pydev debugger: process 13911 is connecting
Connected to pydev debugger (build 162.1967.10)
Traceback (most recent call last):
File "/pycharm-2016.2.3/helpers/pydev/pydevd.py", line 1580, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/pycharm-2016.2.3/helpers/pydev/pydevd.py", line 946, in run
time.sleep(0.1) # busy wait until we receive run command
KeyboardInterrupt
Process finished with exit code 1
Well I wast testing the new build in other environments and notices that it works. The solution, or at least what worked for me, is to delete the .idea folder of the project which seemed to be corrupt. And I back on business !
Thanks a lot Samuel. Your solution has solved the same problem. Go to the debug window and you'll find on the left a button with 2 red balls (breakpoints), just click it and remove all of them. That's all :)
$ uname -a
Darwin Ians-MacBook-Air.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
Connected to pydev debugger (build 162.1967.10)
Could not connect to 127.0.0.1: 60695
Traceback (most recent call last):
File "/Applications/PyCharm 2.app/Contents/helpers/pydev/pydevd.py", line 1572, in <module>
debugger.connect(host, port)
File "/Applications/PyCharm 2.app/Contents/helpers/pydev/pydevd.py", line 319, in connect
self.initialize_network(s)
File "/Applications/PyCharm 2.app/Contents/helpers/pydev/pydevd.py", line 311, in initialize_network
time.sleep(0.1) # give threads time to start
KeyboardInterrupt
Process finished with exit code 1
Hi Dtoro25,
You got it, fix fully working!
Thanks again!
Cheers,
JB
You're welcome +Jean-baptiste
@Dtoro25,
I had a similar problem, but not the same resolution.
I had previously built the pydev debugger under Python 3.3 using
python /Applications/PyCharm.app/Contents/helpers/pydev/setup_cython.py build_ext --inplace
.I then had to update my project to use a new virtual environment under Python 3.5, and now the debugger won't run, with much the same message as you posted, albeit different line numbers.
I tried rerunning
setup_cython.py build_ext --inplace
under the updated Python version, invalidating my caches, restarting, deleting my.idea
folder, but nothing manages to resolve the message above. Did you figure out anything else about it?Not really @Jon, everything is working for me even using Python 3.5 and other versions without problem. Perhaps you should try downloading the latest version which seems to have more fixes. I believe something was left from Python 3.3 in 3.5 and these two are incompatible... Try reinstalling too if nothing works
@Dtoro25, thanks for following up. Nothing short of creating a new project in PyCharm (on version 2016.3 no less) could get the debugger going again, which implies that there is something deeply cached on the project itself despite eliminating the .idea directory, invalidating caches, and remaking a virtual environment. Maybe that qualifies as a bug in the IDE, and I'm a little bummed that the stack trace is so short and obscure, but tracking it down any further is no where near worth the time when I can resolve it by just cloning the repo, manually moving over a little uncommitted work, and remaking the run configs.
Thank you Samuel. That worked for me too. I appreciated the "two red balls" hint, too, Sgalinma
I met same problem. Then I deleted .idea folder but it didn't work.
After that, I added a breakpoint randomly.
Then my debugger got working.
Hope this could solve your problem.