Terminal doesn't use custom bash profile when debugging
See original GitHub issueredirected here from closed issue https://github.com/microsoft/vscode/issues/80434 The bug appeared after one of few last updates. When integrated terminal starts it uses custom profile (as expected), but after python script is started it loads profile from ~/.bashrc
In my settings.json I have the following settings:
"terminal.integrated.shellArgs.osx": [
"--rcfile", "/Volumes/DISK/projs/TechStuff/settings/profile"
],
"terminal.integrated.env.osx": {"HISTFILE":"/dev/null"},
"terminal.integrated.setLocaleVariables": false,
Environment data
Version: 1.38.0 Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35 Date: 2019-09-03T21:47:00.464Z Electron: 4.2.10 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Darwin x64 17.7.0
Expected behaviour
using custom profile (environment)
Actual behaviour
using standard profile (environment), after starting python script
Steps to reproduce:
- Assign custom profile to integrated terminal settings.(and restart maybe)
- Open page(tab) with any python script and open integrated terminal. (You can put string like echo ‘bashrc loaded’ in profile file to see it loads)
- Check profile - it is cutom.
- Debug python script (F5 or Debug -> Start Debugging) - it loads bashrc profile instead of custom
- Check which profile is loaded (can use printenv command if you set different env. variables or check echo print as mentioned above) - standard profile loaded.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:11
Top Results From Across the Web
bashrc cannot be sourced, how can I debug? [closed]
I eventually found an answer to this question here: Any command in my terminal that exits with non-zero code closes my terminal window....
Read more >Fix for .bashrc not executing on startup in Ubuntu on Windows ...
Tip: The source command reads and executes the commands within a file, so would certainly load the ~\. bashrc file, and set the...
Read more >bash - VSCode Integrated Terminal Doesn't Load .bashrc or ...
I was having a problem that it was loading bash_profile instead of bashrc. Deleting the bash_profile file fixed it. – madprops. Mar 19,...
Read more >bash.bashrc not working for all users - Ask Ubuntu
Consider temporarily adding [[ -f /tmp/bash.bashrc.debug ]] && echo "$USER in bash.bashrc" just before your alias . Then, through touch and ...
Read more >Terminal not sourcing ~/.bash_profile
I solved this by setting the value /bin/bash --login in setting->Tools->Terminal->Shell path. /bin/bash --login forces the bash to read the ~/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue on win10. I find the debug terminal does not load the arguments given in
terminal.integrated.shellArgs.windows
, while the terminal launched withctrl+`
load them.For example, my
settings.json
is given asWhen launched with
ctrl+`
, the terminal is a login shell (“-l” works), and loads the profile. When debugging, the arguments “-l” and “-i” are missing.My “hacky” solution is to manually source the profile in
~/.bashrc
is this issue resolved? I’m encountering the same issue on Windows when trying to debug remotely on Linux. this issue is very important for debugging.