feat: define problem matcher for panics in VS Code

Now in VS Code "go to next error" (`F8`) will bring you to the source of
a panic.
This commit is contained in:
Aleksey Kladov 2023-05-06 16:49:42 +01:00
parent a4966c9282
commit 7bc60f512e
2 changed files with 23 additions and 1 deletions

View file

@ -1512,6 +1512,18 @@
"endColumn": 6
}
]
},
{
"name": "rust-panic",
"patterns": [
{
"regexp": "^thread '.*' panicked at '(.*)', (.*):(\\d*):(\\d*)$",
"message": 1,
"file": 2,
"line": 3,
"column": 4
}
]
}
],
"languages": [
@ -1561,6 +1573,16 @@
],
"pattern": "$rustc-json"
},
{
"name": "rust-panic",
"owner": "rust-panic",
"source": "panic",
"fileLocation": [
"autoDetect",
"${workspaceRoot}"
],
"pattern": "$rust-panic"
},
{
"name": "rustc-watch",
"owner": "rustc",

View file

@ -128,7 +128,7 @@ export async function buildCargoTask(
name,
TASK_SOURCE,
exec,
["$rustc"]
["$rustc", "$rust-panic"]
);
}