Project view not showing directories

Somehow the Project view is not showing the directories for my Project?  It's as though it's treating the build.xml as the 'root' of the project and I'm not able to browse directories as I usually can.  I've tried invalidating the caches and restarting, no help.  Problem is not present for any of my other projects.

Screen shot 2011-12-20 at 11.22.52.png

Further to this, the Project preferences for Directories won't load to show which directory the project points to.  See attached.

Screen shot 2011-12-20 at 11.40.01 (2).png

Check your idea.log -- it may have some details explaining why or what is happening (Help | Reveal log in Explorer). Possibly one of the config files got corrupted.

You can always backup and delete .idea subfolder (project settings) and re-create project from scratch. When it's wroking again (after basic configuration) you may copy some of the files from that folder back to recover some of your settings (if there were many).


Thanks, I didn't have to many settings, and deleting .idea then recreating the project has solved the problem.


Though, sorry, I didn't check the log before I deleted it... :( If it happens again I will do and report back findings if that would help.


Thanks, deleting the .idea directory worked for me. After that all the folder showed up again.


Is that it? No way to force reindex the project folder ... so every time I add a new folder I have to close the project, delete .idea then open the project again ??



No idea. That delete option was offered as hard workaround for one time issue.

If it happens to you all the time.. then it must be something else and needs investigation. Contact Support Team by making Support Request -- use "Submit a Request" link at the top of this page.


Thanks, deleting the .idea directory worked for me too.


Switch to "Project Files" view instead of "Project" view. Done.!!!


Switch to "Project Files" view instead of "Project" view

Worked for this newb


To view all folders in explorer project view...
File -> Settings

Version Control -> Directories

Add content root to project root folder. All folders will appear in project


Issue still persists in PHPStorm 2020.2.

No directories found, Settings > Directories is empty ("nothing to show").

Deleting the .idea/workspace.xml file did the job for me. The re-created workspace.xml did not show any significant differences - however, re-creating the file also created a .idea/<project>.iml file which was missing before. So I suppose that's might be the core of the problem. Also, the inspectionProfiles folder was created after that, but I suppose that is just because previously my source folders were not available for indexing.


I think I found a simple solution that seems to work for me in PHPStorm. Yes, you can switch to the "Project Files" view, but that does not solve the problem of namespaces not being properly detected and "class not found" inspections in the IDE.  I tried invalidating the cache and restarting but that did not seem to help. I did not want to delete the .idea directory. On a whim, I tried closing the project via the "File-->Close Project" menu and re-opening it. This worked for me after all other methods failed. I didn't even have to restart the IDE. So, apparently manually closing and re-opening the project without restarting the IDE does something different than simply closing the window and restarting the IDE. 


You're definitely right, Brett. Thank you!)


If you still facing this issue, check that your path to the project doesn't contain special characters. Because in my case, there was a folder "\...more!\" and in Settings>Directories content root was "\...more\!\". 


Banehallow unless spaces are considered special characters, this cannot be the reason in my case.

Brett Brewer got it right, that's the most simple workaround. However, this is only a workaround and still a bug that should be addressed.


Brett Brewer, thank you! Your simple solution helped me! For me - the same issue appears in my IntelliJ IDEA Ultimate 2020.3.


Brett Brewer you're lifesaver, man!


Brett Brewer is a genius. Saved me so much time, thank you.


Brett Brewer thanks

4 Idea team -> you should optimaze open dialog it is very often unstable part of IDE, it is very anoyng sometimes work, but after few update some problems occurs


Brett Brewer's solution worked for me as well! Thank you.


I had this issue with two projects. Neither Oliver's nor Brett's solution didn't work in my case. Invalidating the caches and restarting did not work, either. Deleting the `.idea` directory fixed the issue on the first project, but found a simpler solution with the second one:

  • Update the paths in `idea/modules.xml`




So, I see what is gong wrong, and I now have a good understanding why. The problem is that the .idea folder is best not committed to git/version-control as it differs per developer/system. My tip to all is to ignore the folder, but more importantly untrack the folder as well. Switching to branches which still have this folder tracked, can bring problems as you will be switching .idea folder to other developers and older states (losing for example run configurations).

(I think my problem still arises for because my master branch still contains the .idea folder, so I have to release/PR to master to untrack it and it will be fixed.)

How to fix it:
1) Add .idea or **/.idea to .gitignore

... other ignores

2) And untrack the folder (adjust the path to your situation). Make sure to commit/push and PR/merge/release the result to any afflicted branches.

git rm -r --cached .idea

@D J Zwart

You can share the .idea in VCS if that makes sense/brings benefits for your team. Just not the whole folder: some dev-specific files need to be excluded. Check the link below for some general info:


What worked for me is that I closed the project from the "File" menu, then delete the .idea/ folder from command line and then open the project again.



Thank you, that worked for me unlike other solutions


The issue still persists for me using WebStorm.

Here's a list of proposed solutions from this thread that don't work for me:

  • Doing a "File > Close Project" and "Open Recent"
  • Quit and Restart doesn't work
  • Tell git to ignore the .idea/ folder (it's not tracked in the project)

The only thing that works is to delete the .idea/ folder and start fresh.

WebStorm 2021.1.2
Build #WS-211.7442.26, built on May 24, 2021
Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7


Thanks, deleting the .idea directory worked for me too.