I had the Cannot edit in read-only editor
error when trying to edit code after stopping the debug mode (for 2-3 minutes after pressing Shift+F5
).
Turns out the default Node version (v9.11.1) wasn't exiting gracefully, leaving VScode stuck on read-only.
Simply adding "runtimeVersion": "12.4.0"
to my launch.json file fixed it.
alternatively, change your default Node version to the latest stable version (you can see the current version on the DEBUG CONSOLE
when starting debug mode).