Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problemMatcher in vscode-cpptools fails to open warnings in files while using nested makefiles and gcc #964

Closed
basiljoseph opened this issue Aug 10, 2017 · 2 comments

Comments

@basiljoseph
Copy link

  • Visual Studio Code 1.14.2
  • Extensions: cpptools
  • OS: Windows 10 1607(14393.1358) x64

I have asked this question earlier on stackoverflow.
https://stackoverflow.com/questions/45594118/file-not-found-error-on-visual-studio-code-when-clicking-on-problems-window-usi

When using nested makefiles to compile a binary using gcc, the warnings produced by the makefiles in sub directories are captured in the problem tab.
But clicking on them shows a "File not found error"
VS Code IDE is not considering the sub folders in the path, although Eclipse IDE is properly handling them.

I have tried different combinations on the fileLocation field provided at https://code.visualstudio.com/docs/editor/tasks#_variable-substitution
But they dont work.
My current tasks.json looks like this.

{
    "version": "2.0.0",
    "tasks": [
        {
            "taskName": "make",
            "command": "make",
            "type": "shell",
            "problemMatcher": {
                "base": "$gcc",
                "fileLocation": ["relative","${workspaceRoot}"]
            }
        }
    ]
}

Is there any workaround available to open the file when clicking the warnings in problem tab?

@sean-mcmanus
Copy link
Collaborator

The only thing the C++ extension does is define the gcc problem matcher. I'm not aware of a workaround. Can you try filing an issue with VS Code itself? Such as http://stackoverflow.com/questions/tagged/vscode (or https://github.com/Microsoft/vscode/issues if it's a bug or feature request) .

@basiljoseph
Copy link
Author

It looks like this is a known issue in VS Code itself.
So I will close this, hoping the original issue will get fixed soon.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants