惰性Log

技術系の話題を中心に書いています

VSCodeとWindows TerminalでDeveloper PowerShellを起動する

TL;DR

Windows Terminal

C:\Program Files\PowerShell\7\pwsh.exe  -noe -c                 "&{Import-Module 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell  677f3018}"

Visual Studio Code

  "terminal.integrated.profiles.windows": {
        "Developer PowerShell for VS 2019": {
            "source": "PowerShell",
            "icon": "terminal-powershell",
            "font": {
                "face": "CaskaydiaCove Nerd Font"
            },
            "args": [
                "-noe",
                "-c",
                "&{Import-Module 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell  677f3018}"
            ]
        }
    }

Windows Terminalは設定の「コマンドライン」に、VSCodeはsettings.jsonに記載する。