Pycharm debugger can't start: finished with exit code -1073741819 (0xC0000005)

Question:

After reinstalling anaconda, I set up a new Pycharm project. When I debug one of my python scripts it get this error:

pydev debugger: process 12636 is connecting
Process finished with exit code -1073741819 (0xC0000005)

This only happens when I debug. Any advice?

For reference, these are the software versions I am currently using:

Python version: 3.5
Pycharm version: 2017.3
Anaconda Navigator version:1.8.7

Asked By: BOB FLORMAM

||

Answers:

Same problem as you Bob.

Here is my workaround (not a complete fix but it does the job) :

Copy/paste the entire sites-packages folder from the anaconda (or miniconda => works for me too) to the default python interpreter and switch to this default python.exe interpreter inside your project (Settings -> Project Interpreter).

For example overwrite the folder C:Miniconda3Libsite-packages to C:Users YOUR_ACCOUNTvenvLibsite-packages

After that run AND debug modes are both available.

Hope this help !

Answered By: Fabrice Leray

In my case, updating the pyqt4 package (precompiled version) solved the issue.

Answered By: emher

Similar to above I’ve encountered this with a range of packages with pyCharm–usually closing and opening pyCharm fixes the issue (updating pyCharm version).

If that doesn’t work, I methodically update all python packages.

Answered By: Bjc

I got the same error when running PyCharm debugger with code that includes following:

from pympler import muppy
all_objects=muppy.get_objects()  # this method causes pydev debugger exit

It was fine if execute the same piece of code through PyCharm in non-debug (Run) mode. Disabled the above code in debug mode, issue resolved.

Environment: PyCharm Community 2019.3, Anaconda 3, Python 3.7.3, pympler 0.7, Windows 10 Enterprise

Answered By: Jonathan L

Same in version 2023.1.
It is a known bug (https://youtrack.jetbrains.com/issue/PY-54397/Debugger-crashes-when-breakpoint-is-inside-a-loop).
The workaround working in my case was adding the following environment variable:
enter image description here

Answered By: eleuteron
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.