File Sync Issue when using Grunt file watch
Using WS 8 Beta.
I've built an app using the generator-angular ndoe package.
Running the app using the command: grunt serve
This processes the files based on that grunt task, opens the app in a browser tab and keeps a watch on any changed files and reloads that browser tab if files change.
The problem is that the compiled file that webstorm looks at, isn't updated when the source file is changed. However, WS does in fact see the values have changed. Here are a few screenshots to explain what I'm seeing.
This is the main.js file that WS is seeing, this is the output file from the grunt task.
This is the updated actual source file for the file main.js, I've just added a bunch of junk into the testVar
Here however is the debugger window, it shows the updated values as I would expect.
So the problem is, the version of the file that is shown when you hit a breakpoint in WS, isn't the same version as the actual source file. It's using a cached version that is out of sync.
请先登录再写评论。
I found the refresh button that will reread the file that is loaded in the browser. So that solves this issue, but I think it really should be done automatically (or an option for automatically doing it), since the data and the javascript you're looking at are out of sync until you refresh.
Sorry, don't understande what you are talking about.
Most probably, WebStorm doesn't 'see' the compiled files (BTW, what do you mean by 'compiled' - minified? what does your grunt task do exactly?) - they are external to it, and thus can't 'live update' the page as it usually does on changing files being debugged