What does the yellow background on filename mean in Intellij?

13,179

Solution 1

This color indicates the non-project files (libraries), you can customize it here:

non-project files

Make sure to restart the debugger for the changes to have effect.

Solution 2

If this suddenly happens to your project:
Consider closing pycharm and deleting the .idea/ folder of that project.

After reopening the project the project, pycharm will detect all files as normal. But you'll need to set up the project again. -> Set source-folder, add run configuration etc.

For me that was the faster solution than figuring out how to fix it.

One more mention: It happened after a merge which caused some version conflicts and required to "roll back" a file.

Solution 3

This also happened to me and the cause was that the project folder was removed from the 'project structure'. You can re-add it in Settings-> Project <...> -> Project Structure.

Settings-> Project <...> -> Project Structure.

See also the documentation: https://www.jetbrains.com/help/pycharm/configuring-project-structure.html

Solution 4

The above solution did not work for me -- by happenstance, I was clicking around the settings in Intellij/GoLand and stumbled across a solution that worked for me.

When I went to the Project Structure, the Project Structure pane was empty and there was no way for me to manually re-add my project directory.

Fix that worked for me: Top Menu Bars -> File -> Repair IDE

A bubble window shows up on the bottom right, and I just clicked through the tooltips to repair different aspects of Intellij. In my case, the 'Reindex Project Structure" step worked for me (it was Step 3 of 6 in the repair process).

After repairing + waiting a bit for the project to reindex, everything went back to normal.

Share:
13,179

Related videos on Youtube

Ashwin Praveen
Author by

Ashwin Praveen

Updated on March 18, 2022

Comments

  • Ashwin Praveen
    Ashwin Praveen about 2 years

    I think it might have something to do with asynchronous tasks but I don't know for sure. Could someone please clarify this for me?

    Also what do the yellow frames mean when you are debugging?

    enter image description here

  • Florent
    Florent about 3 years
    My files used to be project files and sudenly turned to be non-project files. After a PyCharm update, looks like it's a bug
  • jeninja
    jeninja over 2 years
    thanks. I was deleting .idea directory inside intellij. You need to make sure to close intellij first and then delete the directory.
  • angelacpd
    angelacpd over 2 years
    I had this issue in PyCharm and this solution worked for me. Thank you.
  • konnovdev
    konnovdev about 2 years
    this solution helped me in webstorm IDE
  • Andrew
    Andrew about 2 years
    Great, this works also for PyCharm
  • lucianokrebs
    lucianokrebs about 2 years
    Worked for me on WebStorm 2021.3.3! Thank you, @Steven
  • Jake
    Jake almost 2 years
    Can confirm that this solution works for PyCharm 2021.1.1