.vscodeフォルダを作成
launch.jsonは必須
tasks.jsonとsettings.jsonはオプション
launch.json
F5でデバッグ実行
{
"version": "0.2.0",
"configurations": [
{
"name":"Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/us_pc/sm64.us.f3dex2e.exe",
"cwd":"${workspaceRoot}/build/us_pc/",
"externalConsole": true,
"miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe"
}
]
}
tasks.json
Ctrl+Shift+Bでビルド
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "make -j4 DEBUG=1 WINDOWS_CONSOLE=1"
}
]
}
settings.json
デフォルトShellをPowerShellからmsys2に変更
{
"terminal.integrated.defaultProfile.windows": "MSYS2 Bash",
"terminal.integrated.profiles.windows": {
"PowerShell": { // ↓↓↓デフォルト設定
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}, // ↑↑↑デフォルト設定
"MSYS2 Bash": {
"path": [
"C:\\msys64\\usr\\bin\\bash.exe"
],
"args": [
"--login"
],
"env": {
"MSYSTEM": "MINGW64",
"CHERE_INVOKING": "1"
}
}
}
}