PyCharm - some breakpoints not working in a Django project

While I don't know why or how, the problem was resolved by deleting the ".idea" directory within the Django project directory. This is where the PyCharm project data lives, so by removing this directory you will lose your project specific settings, so just be aware. Hope this helps someone else.


If you have the setting "Gevent compatible debugging" enabled it does not seem to hit breakpoints in a non-Gevent django application.

Find it under Preferences -> Python Debugger -> Gevent compatible debugging


In my case, setting the "No reload" option in the run/debug configuration solved the problem. I'm using python 3.8.


Make sure that the breakpoint is not located in a project (dependency) directly symlinked from the project (the main project) that uses the symlinked project. I say directly, because PyCharm does follow breakpoints in symlinked projects located in site-packages, but this is an indirectly simlinked project.

Ex:

Scenario 1

Project A

  • ProjB_SymLink

Site-Packages

  • Other Packages

Scenario 2

Project A

Site-Packages

  • ProjB_SymLink
  • Other Packages

In Scenario 1, PyCharm will not see breakpoints located in code under Project B. In Scenario 2, it will.

The below also should be useful: http://devnet.jetbrains.com/thread/442551