-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
duplicatetasks/build/debugAn issue relating to tasks.json (e.g. build issues)An issue relating to tasks.json (e.g. build issues)
Milestone
Description
Type: General
Environments
- OS and Version: Windows_NT x64 10.0.18363
- VS Code Version: 1.44.0-insider
- C/C++ Extension Version: 0.26.3
Describe the bug
The build task templates on windows, e.g. g++.exe build active file, contains:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "g++.exe build active file",
"command": "C:\\Users\\someone\\scoop\\apps\\gcc\\current\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\Users\\someone\\scoop\\apps\\gcc\\current\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}But the problemMatcher $gcc use relative path by default. And if there is warnings or errors emitted during the build process, we can't use the problem panel to track it down. Clicking on a problem entity will cause an error notification:
Unable to open 'test.cpp': Unable to read file 'd:\Workspaces\test\d:\Workspaces\test\test.cpp' (Error: Unable to resolve non-existing file 'd:\Workspaces\test\d:\Workspaces\test\test.cpp').
Potential fixes
Use relative path for build by default, or use absolute path for problemMatcher $gcc by default.
Metadata
Metadata
Assignees
Labels
duplicatetasks/build/debugAn issue relating to tasks.json (e.g. build issues)An issue relating to tasks.json (e.g. build issues)