How can I debug a VS Code Problem Matcher

547 Views Asked by At

I'm trying to write a custom problem matcher for VS Code. My matcher matches nothing, even though testing the regular expressions on the output seem to work. I'm not even sure VS Code loads my problem matcher, let alone see which regular expression matches and which isn't.

Is there a way to debug a problem matcher? I'm basically stuck with no way to move forward.

1

There are 1 best solutions below

0
On

This is an old question, but I found this site super helpful:

https://regex101.com/

It allows you to debug regular expressions. You can put an example line of compiler output and try your matcher against it.

One issue I had to figure out is that the VS Code expression is stored in a JSON file, so it has extra escape characters that should be removed if you're using the regex somewhere else.