Search code examples
visual-studio-codevscode-tasksvscode-problem-matcher

VS Code Problems tab: Clear items coming from tasks with problemMatcher


I have a few VS Code tasks with a problem matcher. When I run them, they work as expected, i.e., (re)populate the Problems tab with messages accordingly. Owner is always set.

However, is there a way to clear the items without restarting/reloading VS Code?

While not ideal, an extra task would work for me just fine.

I am not sure I am using this feature right. Since this particular flow is kind of manual, as it doesn't reflect subsequent changes in code unless I run the task again, I'd expect to be able to reset as well, and preferably keep items coming from extensions.

I've read some posts on the topic here and on GitHub, but couldn't find a straight answer.


Solution

  • Note: You did well to specify owner. If you don't do that, then the problems matched by the task will not be cleared when the task is re-run (see also issue ticket #164751).

    As far as I know, at the time of this writing, there is no way to get what you want. What I'd suggest to do is take a look at the existing feature-request issue ticket surrounding related functionality and see if any request something you'd like to get implemented (I think any one of these would solve the problem- they're just different ways of doing it):

    I suggest that you give those issue tickets a thumbs up to show support for them. You can also subscribe to them to get notified about discussion and progress. Please avoid making noisy comments there like ones that just consist of "+1" / "bump".