vsCode on Problems panel, items from tasks/problemMatcher -how to remove an item when there is no more error

740 Views Asked by At

Using VSCode, I define a Task to compile my code. Into the task, I define a problemMatcher to catch error(severity=error) or success(severity=info). When I execute the task, if error match pattern, VSCode report it into a item of Problems Panel. So, I read my error, place a correction on my code and re-start the task to compile. Now, there is no more error. BUT how to remove the 'error' item from the Problems Panel ?

Is there a way to define a 'no'problemMatcher ? or a command to remove a item on panel ? ?

1

There are 1 best solutions below

0
On

so, I found I need to define the problemMatcher.owner with a value (arbitrary).

If omitted, each execution set a different owner to the 'problem' item and then it do not delete previous 'problem' items.

Default 'external' if omitted seems not exact or not complete.

I discover it when I analyze the detail of Problems items (right copy message) from my problems and compare with working tasks/problemMatcher. The main difference was the owner value, unique on mine, same on working tasks/problemMatcher.