Code change:
Type: <bBug</bI use the shell: When I start VS Code not from the terminal, I see a popup with the error: I know why this issue occurs - it's because VS Code is assuming bash semantics for launching the user's shell in order to solicit environment variables. I encountered the . In that report, I reached out to the xonsh project (xonsh/xonsh) to see if the shell might be able to support bash syntax for this purpose, but after some consideration, they rejected the idea, instead asking editors to honor the shell. Here I'm making the same request to VS Code, namely that if the shell is xonsh ("xonsh" appears in the user's shell path), to use a syntax specialized for xonsh to extract the user's environment, namely: If direct support for xonsh can't be , would you consider adding a configuration variable such that a user of xonsh could customize VS Code to honor xonsh as the default shell? VS Code version: Code 1.85.0 (Universal) (, 2023-12-06T18:18:04.614Z) OS version: Darwin arm64 23.1.0 Modes: <details<summarySystem Info</summary </details<details<summaryExtensions (7)</summaryExtensionVersion ------ copilot1.141.0 copilot-chat0.11.0 black-formatter2023.6.0 isort2023.10.1 python2023.22.0 vscode-pylance2023.11.10 sublime-keybindings4.0.10 </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
I acknowledge that starting VSCode from the CLI does work around the issue, but even then only for that launch. If I launch VS Code from the CLI, then it has to restart (such as due to an update), it once again is unable to resolve settings and the error appears.
I believe this is or ?
<!-- -96bd-47a8-a0e8- --This feature request is now a candidate for our backlog. The community has 60 days to the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our . Happy Coding!
This is a backlog candidate but still PRs are welcome. Here's where explicit xonsh support would need to be :
this is being in with minimal testing, could you track any comments/issues with it while I'm out in January? We mainly just need author verification
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Verified by installing and starting insiders from the terminal. I didn't see the error mentioned above. would be good if you'd confirm this.
I can confirm, with 1.86.0-insider, the error is gone. I was unable to test on the original machine, but I've tested on a new, similarly configured machine (and confirmed that the default shell is configured for xonsh, same as reported above). I'm so delighted that it's fixed and that I was able to help. Thanks for the guidance and support. /verified

Related discussion:
text: } else if (name === 'nu') { // nushell requires ^ before quoted path to treat it as a command command = `^'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`; shellArgs = ['-i', '-l', '-c']; <ins> } else if (name === 'xonsh') { // #200374: native implementation is shorter command = `import os, json; print("${mark}", json.dumps(dict(os.environ)), "${mark}")`; shellArgs = ['-i', '-l', '-c']; </ins> } else { command = `'${process.execPath}' ${extraArgs} -p '"${mark}" + JSON.stringify(process.env) + "${mark}"'`;