1

Recently I've been having this issue that I get different exceptions when running my code normally vs in debug mode, and sometimes even when it runs normally without hitting an Exception it will still hit an Exception during debugging, even with no break points.

Sometimes instead of an exception I'll get "Process finished with exit code -1073741819 (0xC0000005)" (while running fine when not debugging). I've looked this up but it seems to have random causes and none of the answers I've found worked for me.

If I place break points to see what's happening it will usually not have an exception...

Last time this happened I closed PyCharm and reopened it later an it started working normally but this keeps happening, and that fix doesn't work anymore.

I don't really have steps to reproduce since it seems to be random...

I'm using Windows, PyCharm 2020.2.3, python 3.10 and have no imports (other than re)

1
  • Related here.
    – jarmod
    Commented Mar 28, 2022 at 19:03

1 Answer 1

1

Possible solutions:

  • Downgrade Python. I've seen the same issue on 3.10, but not on 3.6.
  • Add extra breakpoints. In some cases adding more breakpoints prevents the issue - even a breakpoint in unreachable code.
  • Add an environment variable: PYDEVD_USE_CYTHON=NO. I'm not sure what effect that has though.

Not the answer you're looking for? Browse other questions tagged or ask your own question.