I know, this issue is one of the favourite ones here and I got much information regarding this topic. The solutions I've read about are often simple configuration changes like:
- Checkmark into Synchronize files on frame or editor tab activation in Appearance & Behavior >> System-Settings.
- Setup Deployment-Options to Always-Upload and including external-changes.
- Using plugins, external mounted locations and so on...
Or just use a File-Watcher to fire a command to start your build-application or script and getting upload the resulting changes.
But all recommendations ignoring often the fact, that people are looking for a way to auto-upload watched files from an external application/script and don't want to use another build-system with File-Watcher.
As an example:
- In a Laravel project with a simple webpack-setup (JS/SCSS → Compile and Minify to Public) to fire an build-script `npm run dev` and getting the results uploaded via a File-Watcher takes: 5-7 seconds.
- To do the same without File-Watcher and working with the Always-Upload-Deployment Options on a watches (via `npm run watch`) file by just Tab outside and inside PHP-Storm takes 1-2 seconds until the file gets uploaded.
So the current only option or more felt like workaround which I've found was to write an script and bind it with a hotkey via BetterTouchTools which does the job (point 2: save file, unfocus phpstorm, focus phpstorm, focus browser) for me.
But I can't think that this can be really the the intention of the developers of PHPStorm.
So I just want to ask:
How did you solved the issue, that you don't really get an detection of external file-change if you don't toggle a "Synchronize" or Trick out the "System-Settings-Options for Synchronize" to do the job of uploading file-changes to your remote-location.
File-Watcher seems to slow, also because it is not made for external watch-processes and focus more to run the build-commands of external build-tools. But still an external watched file is builded faster then a a simple build-process where webpack for example has to validate and setup everything before generating the expected files.