All you have to do is add:
"configurationDefaults": {
"[powershell]": {
"debug.saveBeforeStart": "nonUntitledEditorsInActiveGroup"
}
},
under contributes in the package.json.
here's an example:
https://github.com/microsoft/vscode/blob/bce4d71f648a963cad905ee0ecc7b353ddd3f199/extensions/markdown-language-features/package.json#L311
Then Untitled file debugging will no longer prompt to save :)
Note: VS Code made this setting "language-aware" literally today. So this will work starting with tomorrow's insider build. There's no downside of this being set for those folks on older versions of VS Code so this change can really go in whenever.
cc @isidorn
Is this a duplicate of #3200?
Yep, looks like this would resolve https://github.com/PowerShell/vscode-powershell/issues/3200
This is a better solution than the other :)
@TylerLeonhardt Is this new enough?
29c61570a5b9a669f777bb28b5acd5c37d99edbe
Date: 2021-05-20T05:41:52.156Z (12 hrs ago)
It doesn't seem to be working...maybe I have something else going on.
I've double checked what I added to package.json against https://github.com/microsoft/vscode/pull/117100 ...hm, I'll open a draft PR and maybe I erred?
Yeah it looks like that setting isn't working as expected. @isidorn, any thoughts?
Thanks for doing this PR.
There was an issue on the VS Code side that I tackled via https://github.com/microsoft/vscode/commit/779f9876bc0a29fa2cfd811e5c613e05c5ec8e21
So now it should work. I tried it out.
You can verify with vscode insiders from Monday. Thanks a lot 馃憦
Most helpful comment
Thanks for doing this PR.
There was an issue on the VS Code side that I tackled via https://github.com/microsoft/vscode/commit/779f9876bc0a29fa2cfd811e5c613e05c5ec8e21
So now it should work. I tried it out.
You can verify with vscode insiders from Monday. Thanks a lot 馃憦