To everybody suggesting using .bashrc as a replacement for .bash_profile, it's important to distinguish between the two, as they are different:
.bash_profile is executed at login.
.bashrc is executed each time a bash instance is created, including sub-shells.
Using .bashrc for such settings might cause errors and even be dangerous. For instance, this kind of code is usually added to .bash_profile and should never be added to .bashrc:
PATH="$PATH:$HOME/bin"
(The HOME variable could have been altered, plus $HOME/bin will be added multiple times).
Also, aliases are defined in .bashrc (like alias rm='/usr/bin/rm -i') and are only meant to be used in interactive shells, so scripts using rm or cp will break.
The right answer for this question, as others suggested, is adding:
{
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"args": [
"-l"
]
}
}
}
The local file can be found here:
C:\Users\{username}\AppData\Roaming\Code\User\settings.json
That will make shell scripts started from VSCode to run the .bash_profile script, but not the subshells.