Change:
import { RunOnceScheduler, ThrottledDelayer } from 'vs/base/common/async'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; <del> import { IFileService } from 'vs/platform/files/common/files'; </del> <ins> import { IFileService, FileListener } from 'vs/platform/files/common/files'; </ins> import { IPanel } from 'vs/workbench/common/panel'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { IEnvironmentService } from 'vs/platform/environment/common/environment';

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!