Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pycharm debugger not connecting: KeyboardInterrupt

Somehow my pycharm debugger doesn't connect anymore.

I tested all ENV. Also, reading up on it on stackoverflow: I deleted the .idea directory.

However, after restarting the pycharm .idea is always recreated (deleted caches and even deleted&downlaoded pycharm again)

**/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 52281 --file /Users/franzi/Desktop/i18n/qordoba-cli/qordoba/cli.py i18n-find --traceback
warning: Debugger speedups using cython not found. Run '"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6" "/Applications/PyCharm CE.app/Contents/helpers/pydev/setup_cython.py" build_ext --inplace' to build.
pydev debugger: process 96448 is connecting

Connected to pydev debugger (build 171.4694.67)
Could not connect to 127.0.0.1: 52282
Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1583, in <module>
    debugger.connect(host, port)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 324, in connect
    self.initialize_network(s)
  File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 316, in initialize_network
    time.sleep(0.1)  # give threads time to start
KeyboardInterrupt

Process finished with exit code 1**
like image 518
Franzi Avatar asked Jul 14 '17 18:07

Franzi


People also ask

How do I enable debugging actions in PyCharm?

Just right-click any line in the editor and select the Debug <filename> command from the context menu. After the program has been suspended, use the debugger to get the information about the state of the program and how it changes during running.

How do I step in PyCharm debugger?

Smart step intoFrom the main menu, select Run | Debugging Actions | Smart Step Into or press Shift+F7 .

What does the lightning bolt mean in PyCharm?

Finding out the origin of the problem button to resume the script execution. The exception is here. Another breakpoint appeared as well: by default PyCharm will halt for any exception that wasn't caught in your code, and it'll show an icon of a breakpoint with a lightning bolt.

What is remote debugging in PyCharm?

With PyCharm you can debug your application using an interpreter that is located on the other computer, for example, on a web server or dedicated test machine. PyCharm provides two ways to debug remotely: Through a remote interpreter.


1 Answers

I had similar problem. I have removed (remove, not disable) all existing breakpoints (in the dialog box invoked by Ctrl+Shift+F8). After removing all breakpoints and modifying run configuration (disable add content roots and add source roots to PYTHONPATH) debugging started to work. Enabling them back and still working fine - problem gone.

I think that removing breakpoints will be sufficient to solve the issue. See hint from JetBrains community: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000014004/comments/115000239630

like image 183
izkeros Avatar answered Oct 17 '22 04:10

izkeros