You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install fish shell and have it working with VS Code. Go to user settings, change "Terminal > Integrated > Default Profile: Osx" to an installed fish shell.
The console will log env vars with MYENV shown to be correctly ingested. For example, when using zsh, the correct single command is run till completion:
> cd <<project_folder>> ; /usr/bin/env 'lines=foo
quote> bar' 'NODE_OPTIONS= --require "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http' 'VSCODE_INSPECTOR
_OPTIONS=:::{"inspectorIpc":"/var/folders/x3/_z626cj108sdszn1f9bs8b1m0000gn/T/node-cdp.43848-5e183c87-146.sock","deferredMode":false,"waitForDebugger":"","execPath":"/Users/shaowei/.nvm/version
s/node/v20.10.0/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"/var/folders/x3/_z626cj108sdszn1f9bs8b1m0000gn/T/node-debug-callback-576db9a978f1245e"}' /Users/shaowe
i/.nvm/versions/node/v20.10.0/bin/node ./app.js
Debugger attached.
<<env vars printed below>>
{
...
MYENV: 'foo\nbar',
...
}
Waiting for the debugger to disconnect...
Actual
The debugger hanged as the \n causes fish shell to run it as 2 separate commands instead. For example the following:
Does this issue occur when all extensions are disabled?: Yes
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_load-environment-variables-from-external-file
Steps to Reproduce
Install fish shell and have it working with VS Code. Go to user settings, change "Terminal > Integrated > Default Profile: Osx" to an installed fish shell.
Follow Load environment variables from external file and set up a
.env
file with a single multiline env varMYENV="foo\nbar"
.Create an
app.js
withconsole.log(process.env)
(not essential to reproduce the bug, just to demonstrate the correct behaviour).Create the following
launch.json
configuration:Expected
The console will log env vars with
MYENV
shown to be correctly ingested. For example, when usingzsh
, the correct single command is run till completion:Actual
The debugger hanged as the
\n
causes fish shell to run it as 2 separate commands instead. For example the following:The text was updated successfully, but these errors were encountered: