Visual Studio CodeをAnaconda Promptにする

・きっかけ

WindowsでAnaconda環境においてデバックするとき、いちいちImport Errorとか出てめんどくさいなと思ったため

 

・やり方

「File」⇒「Preference」⇒「Setting」を押下

integrated shell辺りで検索して、

Terminal>Integrated>Shell: Windowsを「cmd.exe」に変更

 

同じく、

Terminal>Integrated>Shell Args:Windows

Edit in settings.jsonを押下して、

以下のように記載(私の環境では)

{
"terminal.integrated.shell.windows": "cmd.exe",
"terminal.integrated.shellArgs.windows": [
"/K",
"C:\\Anaconda\\Scripts\\activate.bat",
"C:\\Anaconda"
]
}