C/C++向け Makefile 用の tasks.json 設定例です。
実行後は、F8
/Shift-F8
で次のエラー/前のエラーにジャンプできます。
tasks.json 設定例
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "make",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "Makefile",
"isBuildCommand": true,
"args": [
"all"
],
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
参考
C/C++ extension for Visual Studio Code | Visual C++ Team Blog
.net - Visual Studio jump to next error shortcut? - Stack Overflow