Skip to content

Commit 5ee39a6

Browse files
committed
Auto merge of rust-lang#14749 - matklad:matklad/panic-is-a-problem, r=lnicola
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.
2 parents a4966c9 + 7bc60f5 commit 5ee39a6

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

editors/code/package.json

+22
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,18 @@
15121512
"endColumn": 6
15131513
}
15141514
]
1515+
},
1516+
{
1517+
"name": "rust-panic",
1518+
"patterns": [
1519+
{
1520+
"regexp": "^thread '.*' panicked at '(.*)', (.*):(\\d*):(\\d*)$",
1521+
"message": 1,
1522+
"file": 2,
1523+
"line": 3,
1524+
"column": 4
1525+
}
1526+
]
15151527
}
15161528
],
15171529
"languages": [
@@ -1561,6 +1573,16 @@
15611573
],
15621574
"pattern": "$rustc-json"
15631575
},
1576+
{
1577+
"name": "rust-panic",
1578+
"owner": "rust-panic",
1579+
"source": "panic",
1580+
"fileLocation": [
1581+
"autoDetect",
1582+
"${workspaceRoot}"
1583+
],
1584+
"pattern": "$rust-panic"
1585+
},
15641586
{
15651587
"name": "rustc-watch",
15661588
"owner": "rustc",

editors/code/src/tasks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function buildCargoTask(
128128
name,
129129
TASK_SOURCE,
130130
exec,
131-
["$rustc"]
131+
["$rustc", "$rust-panic"]
132132
);
133133
}
134134

0 commit comments

Comments
 (0)