Win10: VS Code integrated bash not loading ~/.bash_profile

Turns out, that it had to do in how the terminal is started. The git bash one (in its own window) is using the login to start and hence reads .bash_profile.

The one in vs code is started not in the login way (sorry, I'm not well versed in this), and reads .bashrc instead of .bash_profile.

My solution was to move all the stuff I kept in .bash_profile and move it to .bashrc and add the following line to .bash_profile:

if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

which loads the .bashrc contents when starting in the login way.


You can try adding to the settings: "terminal.integrated.shellArgs.windows": ["-l"],


As an alternative you can use the .bashrc file instead of .bash_profile.