Reload from disk not always working
Sometimes, when a file on disk has changed, no matter how many times I use "Reload from disk" in IntelliJ, it refuses to display the file contents from disk in its editor. This only happens sometimes, at other times Reload from disk works, and yet other times, I don't even have to do reload from disk, it does it automatically!
When it refuses to reload the file from disk, then often after a few minutes it suddenly "wakes up", discovers it has changed, and finally listens to my command. However my current solution to do it more quickly, is to type a space in the file and press CTRL+S. Then it also suddenly discovers that the file on disk changed and gives a dialog in which I can choose to load the disk version (rather than the memory version).
The "Synchronize files on frame activation" setting is turned off the whole time.
I'm using IntelliJ 9.0.4 on Ubuntu.
Question 1:
Is there any command in IntelliJ that is "harder" than "Reload from disk" that basically means: "The file on disk has really, really, changed, believe me, display me its actual disk contents NOW!".
Question 2:
So IntelliJ has 3 modes of operation that happen at random times to me:
mode 1: it doesn't automatically discover disk changes, but immediatly responds correctly to "Reload from disk"
mode 2: it refuses to display the new file even when doing "Reload from disk"
mode 3: it displays the disk changes immediatly, in real time, without me even having to use "Reload from disk".
I like mode 1 and 3, but hate mode 2. What things influence in which of those 3 modes IntelliJ is? It seems quite random to me...
Thanks!
Please sign in to leave a comment.
Could this be related to the Git plugin? Can version control plugins have an effect on the Reload from disk option?
+1 The same is happening for me, still in September 2022. Using PhpStorm 2022.2.2. I sometimes rename the "vendor" directory in my Magento project, and it's immediately reindexed, but when I run "composer install" to install the dependencies again, PhpStorm fails to recognize that the "vendor" directory is there back again. Forcing to "reload from disk" does nothing.
+1 Same here.
I did a npm install and a
Furthermore, it does not reflect well on you if the "Code" comment function does not work, as you can see from my comment.
After some minutes the directories and files apeared.
I am trapped in this codeblooock.
Do you run gulp commands in the terminal? It might be this known issue: https://youtrack.jetbrains.com/issue/WEB-49252/VFS-is-not-auto-synchronized-on-gulp-watch-triggering-when-using-terminal-as-Gulp-console
If you do, you can try this workaround: https://youtrack.jetbrains.com/issue/WEB-49252/VFS-is-not-auto-synchronized-on-gulp-watch-triggering-when-using-terminal-as-Gulp-console#focus=Comments-27-4648160.0-0.
I tested it for some days now and I didn´t have any problems. Thank you, Oksana Chumak.
It is March 2025, an PyCharm still doesn't reload disks upon change. The only solution is to close the IDE and reopen it. This makes refactoring a nightmare. You move a file an it “thinks” for minutes because that is super slow already. Then you have to restart the IDE. If you have time you can wait for ~5minutes and then the changes usually show up. Now imagine you want to refactor your whole project, file by file. You'll never do it.
Albert A reson for each case can be different. Please file a support request at https://intellij-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66731 for the investigation
IDE logs collected via Help | Collect Logs and Diagnostic Data may help to better understand it