VS代码终端每次都会更改为PowerShell都会、终端、代码、VS

2023-09-03 10:52:48 作者:〆我怕我还是会爱上你_

在vs代码更新1.60.0之后,终端打开PowerShell,但默认设置保持不变(Git Bash)。如果我创建新终端,则会打开Git bash。

当我启动应用程序时,它看起来像:-

vscode 调试终端不关闭 使用VSCode远程调试恶意Powershell脚本

然后我必须创建新的外壳&它会打开默认的外壳(Git Bash):-

推荐答案

先试,然后将terminal.integrated.defaultProfile.windows设置为bash(如果默认情况下需要bash)

这样,您就不必从当前的默认PowerShell终端进行切换。

.前提是microsoft/vscode issue 132149已修复,但目前还不是这样。 这是issue 132150的副本,现在由commit c765e70修复,由Megan Rogge修复。

    async createTerminal(options?: ICreateTerminalOptions): Promise<ITerminalInstance> {
        if (!this._availableProfiles) {
            await this._refreshAvailableProfiles();
        }

更新9月14(2021):此问题现已修复,VSCode 1.60.1及其August 2021 Endgame Recovery。