Open anthonyjclark opened 8 years ago
Thanks for reporting this. On mac, the actual launching of the terminal is a feature of lldb. I don't recall seeing anything in that code-path which would allow for this customization. However, we hope to move to the new internal terminal that was added to vscode in the near future.
There is, however, a shell script that is executed as we bring up the debug adapter (see ~/.vscode/extensions/ms-vscode.cpptools-0.9.1\OpenDebugAD7.) I was originally wondering if you could switch the shell for the debug adapter (and therefore the debuggee) by starting bash from that script, however, I realized the she-bang at the top already runs this as bash. lldb must not be starting the console for the debuggee in the same shell that lldb is running in.
We'll probably need to make a fix for this happen.
Thanks for the quick reply! FYI, when I switch the debugger from lldb to gdb (setting MIMode) it appears to have the same issue. You probably assumed this, but I thought the extra information may be of use.
Alright, thanks for the extra info. Strangely, we actually launch the debuggee via bash. I suspect the option to override the shell is getting applied after the intial bash launch.
Run into the same problem here:
⟩ arch -arch x86_64 '/Users/xxx/.vscode/extensions/ms-vscode.cpptools-0.11.4/debugAdapters/lldb/bin/lldb-launcher' --unix-socket=/tmp/DxmdOu --arch=x86_64 --working-dir '/Users/xxx/work/xxx' --disable-aslr -- '/Users/xxx/anaconda2/bin/python' 'example/xxx.py' ; echo Process exited with status $? ; exit
$? is not the exit status. In fish, please use $status.
fish: arch -arch x86_64 '/Users/xxx/.vscode/extensions/ms-vscode.cpptools-0.11.4/debugAdapters/lldb/bin/lldb-launcher' --unix-socket=/tmp/DxmdOu --arch=x86_64 --working-dir '/Users/xxx/work/xxx' --disable-aslr -- '/Users/xxx/anaconda2/bin/python' 'example/xxx.py' ; echo Process exited with status $? ; exit
The outputs above are shown in a popup macos terminal, and it was attempted to be run in fish shell.
@pluskid From my findings, that's the shell command that actually runs when testing something. If you change $?
to $status
and hit enter, it will actually debug and output properly. There has to be a place where this can be configured, right?
same problem here
+1
+1
As a workaround, I've been setting "externalConsole": false
, but this is an unsatisfactory fix.
Any progress on this? I have also found setting "externalConsole": false
to be the only workaround in the short term.
Is this ever gonna be fixed?
If you're on a mac and use another app as your default terminal you can just change the shell that Terminal.app uses:
Is this issue not ever going to be fixed?
I am working on OS X (10.10.5). I prefer to have my login shell set to fish (/usr/local/bin/fish). However, this appears to break the method currently being used by the extension to launch external console commands.
Specifically, the terminal window that pops up (not a big deal, but it would be "nice" if the extension used the internal debugger settings--I prefer iTerm.app to terminal.app) is pretty obviously expecting a bash shell. My default shell (fish) fails pretty miserably with the given commands, and VS Code quite nicely gives the following message:
Unable to start debugging. Failed to initialize debugger terminal.
Basically I am asking this: is there a method for forcing the external command to use a bash environment instead of the default system environment?
I'd prefer to not have to switch back and forth just to run the debugger (which works fantastically when I switch the system login shell to bash).