Skip to content

Absolute file paths in Problems tab lose their initial slash #44370

@krys-g

Description

@krys-g
  • VSCode Version: 1.20.1
  • OS Version: Linux

Steps to Reproduce:

  1. Install the C/C++ IntelliSense extension.
  2. Have a task/Makefile that invokes gcc with an absolute file path, e.g: /tmp/blah.c ; use the "problemMatcher": "$gcc", provided by the IntelliSense extension.
  3. Have a warning or error in /tmp/blah.c.
  4. Build.
  5. Open the Problems tab, the file is displayed as tmp/blah.c instead of /tmp/blah.c. Trying to open the file will fail, because the editor cannot locate the non-existent file /home/krys-g/work/tmp/blah.c.

Interestingly, clicking on the file link in the Terminal tab opens the file just fine. The problem lies only with the Problems tab, where the initial slash is dropped.

Does this issue occur when all extensions are disabled? N/A

The extension is required to get the $gcc problem matcher.
However, I reproduce the issue with all the other extensions disabled.

The pattern matching of $gcc, as introduced by microsoft/vscode-cpptools#854, looks correct to me, therefore I believe the problem is with Visual Studio Code itself, not the extension.

  "pattern": {
      "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions