I'm using the PyCharm (Python plugin) on IntelliJ Ultimate.
Normally the IDE highlights any undefined identifiers with a red-underline, but I've noticed that on some projects this feature stops working.
Red-underlines are really useful because they allow me to use IntelliJ's auto-fixes (e.g. importing or creating a missing function/class).
Just about every other PyCharm feature I can think of seems to still be working. For example, AutoComplete works just fine.
Sometimes if I set the project's SDK to , and then set it back to the correct Python interpreter the project starts to highlight NameErrors correctly. This doesn't seem to work consistently. I'm using Conda, and I've tried setting up Conda envs as normal virtualenvs, or as "system interpreters".
I've searched the log files and cannot see anything that might indicate the plugin failed to initialize.
In most cases (except for when the system briefly decides to work), I get no red underlines but all of the other PyCharm features seem to work normally. Furthermore, this only seems to affect Python: Scala and Java code behaves exactly as you might expect it to work in IntelliJ.
Is there a way to debug this? What's going wrong? How do I fix it?