问题
I'm using PhpStorm 6.0.3, and it doesn't show any directories in the Project Tool Window. They were there just a minute ago but I managed to make them disappear by clicking or shortkey on accident.
They are there in the file system - I see them in Windows Explorer, but they just don't show up in PhpStorm. I have checked the Jetbrains documentation, checked the scope and tried deleting the project-settings (.idea-dir), but to no avail.
Does anybody have a suggestion on how to show them again? Or where I might have screwed up the settings? Thanks!
回答1:
removing the .idea folder, and restarting the app did the trick for me
回答2:
Have you changed the scope dropdown value by any chance?
回答3:
So, it's now a couple of months later and made the same mistake. Only this time I made 1 directory disappear and was accidentally pointed in the right direction by PhpStorm itself. I excluded the directory from the project, so it didn't show up anymore. Apparently exluded dirs are not saved in the project settings since re-creating the project didn't help.
Here is how I found it back: File > Settings > Project settings > Directories There I saw my dir flagged with a red icon, meaning excluded. Just right-click it and click 'exclude' once again. Tadaaaa it's back.
I can't believe I've overlooked it so many times...
回答4:
My USB flash drive decided to randomly disconnect itself while I was opening up the project, then I plugged it back in and no directories were showing up. Just the default files like all the .git files, .htaccess, and the index.php.
By going to File > Settings > Project: ProjectName > Directories. There was no longer any content root. I just had to click "Add Content Root" select my root folder and I was able to see everything again :)
Also it seems people have excluded directories like their content root or individual files which can be managed through the same settings.
回答5:
Here is how i did it in PHPStorm 2016.
Open the Settings / Preferences Dialog by pressing ⌘, or by choosing File | Settings for Windows and Linux or WebStorm | Preferences for OS X. Click the Directories node.
Then:
回答6:
My Folders got hidden by PHPStorm when I used the Project view:
All files are shown, when you switch to Project Files view:
回答7:
I just solved a similar problem with Webstorm (Windows version 10.0.1) in a Cordova project. I created a new directory within the www folder, did not add any files and closed Webstorm. When I restarted Webstorm the next day, the new folder was invisible but existed as Webstorm refused to create a new one with an " ... already exists" error message and the file was listed as visible in the directories settings.
I solved the problem this way: Closed Webstorm -> Added a file to the empty folder with the Windows file browser -> Opened Web Storm -> The folder and the file was shown.
回答8:
I just experienced this problem in phpStorm 9 where I was trying to create a project from existing files but phpstorm could not see the directory. Very weird.
So what I did was I instead went to "create new project" and manually put in the location box the path to an existing directory. On the next screen it asked something like "directory exists, do you want to create project from these files?" and that worked.
回答9:
PHPStorm seems to do this in case of empty directories (at least if you actively delete a file inside of phpstorm).
As a temporary quick fix you can simply open the folder in explorer and create any empty file:
After you've done this, make sure you syncronize your project by right-clicking and selecting "Syncronize":
That should make your previously hidden folder visible and you can simply create your first actual file and just delete the empty file afterwards.
回答10:
Go to PhpStorm setting(Ctrl+Alt+s) type and select 'file types' not 'other file types'!(Editor > File Types) in 'Ignore files and folders' remove all extension you need(i remove all!).
Apply it and you can see all your files in PhpStorm
回答11:
The below methods showed they were successful but still failed to show some directories which were empty or had a few files
- Synchronize the directory
- No directories were excluded in the Directory tab.
What worked for me was closing the project having the issue and reopening it another project window and choosing open in the current window
来源:https://stackoverflow.com/questions/17445099/phpstorm-hides-directories-in-project-window