Change:
}); } <del> private handleWorkspaceFileEvents(event: FileChangesEvent): void { </del> <ins> private listenToWorkspaceConfigurationFile(): void { if (this.fileListener) { this.fileListenerDisposables = dispose(this.fileListenerDisposables); this.fileListener = null; } </ins> if (this.workspaceConfig) { <del> const events = event.changes; let affectedByChanges = false; // Find changes that affect workspace file for (let i = 0, len = events.length; i < len && !affectedByChanges; i++) { affectedByChanges = resources.isEqual(this.workspaceConfig, events[i].resource); } if (affectedByChanges) { this.reloadConfigurationScheduler.schedule(); } </del> <ins> this.fileListener = new FileListener(this.workspaceConfig, this.fileService); this.fileListenerDisposables.push(this.fileListener); this.fileListener.watch(); this.fileListener.onDidContentChange(() => this.reloadConfigurationScheduler.schedule(), this, this.fileListenerDisposables); </ins> } } }

Discussion:
Issue Type: <bBug</bChanges to the file by external sources (extensions/manual edit) are not picked up anymore until VSCode is relaunched. For instance, if you use notepad to add a workspace folder to the file, VSCode won't show the new workspace folder until the workspace is relaunched in VSCode. This also means that if you then add another workspace folder through VSCode, and save the workspace, the workspace folder with notepad is removed. Using the button doesn't trigger a re-read of the file either. This renders the extension rather useless. VS Code version: Code 1.31.0 (, 2019-02-05T22:35:56.624Z) OS version: Windows_NT x64 10.0. Does this issue occur when all extensions are disabled?: Yes Steps to Reproduce: a new workspace 2 folders to the workspace, called and the workspace and save the file, changing the order of the folders using notepad or the extension that the order in VSCode has not been changed and reopen VSCode, notice that the order in VSCode did change
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.51 --- <!-- score: 0.471 --- <!-- score: 0.46 --<!-- potentialduplicatescomment --
I was not able to reproduce this on macOS at least.
In the screenshot below you can see that VSCode shows a different order of the folders than the file. !
Can you reproduce this with latest vscode insiders?
Yes, I can. The screenshot below shows the difference in the order of the folders between the content of the file within the latest insiders, in this case there are also no extensions active. Changes are not shown in VSCode until it is restarted. !
I can reproduce this also on the mac. The issue here is that the does not fire a event when the order of workspace roots is changed in the code-workspace file. Since the order changed I would expect this event to arrive. Thus forwarding to and
could be the case of a missing file event (given I could not reproduce when I tried on macOS), if so, please forward back to me. did you check if the file event made it through?

--verbose
The file event does not seem to go through. if I start out of source with --verbose flag.
I assume you setup custom file watching for the workspace file right? Where is that code? Does it check for changes?
I think this would have caused by my changes moving away from node based file watching to file service watch. Will investigate further and figure it out.
Thanks for the fix, I just tested it in the new insiders build and everything seems to be working correctly. I am looking forward to the next release!