diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2023-05-06 16:49:42 +0100 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2023-05-06 16:49:42 +0100 |
| commit | 7bc60f512ea56c54de30c7e12919c99f7f15ade4 (patch) | |
| tree | 125650ffe5c6cfb79ee9787bf793df32a85d9f0b | |
| parent | a4966c92829f945d3846eb0ca0e240ac7f7c8c60 (diff) | |
| download | rust-7bc60f512ea56c54de30c7e12919c99f7f15ade4.tar.gz rust-7bc60f512ea56c54de30c7e12919c99f7f15ade4.zip | |
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.
| -rw-r--r-- | editors/code/package.json | 22 | ||||
| -rw-r--r-- | editors/code/src/tasks.ts | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index ca00da9f361..04573174235 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -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": [ @@ -1562,6 +1574,16 @@ "pattern": "$rustc-json" }, { + "name": "rust-panic", + "owner": "rust-panic", + "source": "panic", + "fileLocation": [ + "autoDetect", + "${workspaceRoot}" + ], + "pattern": "$rust-panic" + }, + { "name": "rustc-watch", "owner": "rustc", "source": "rustc", diff --git a/editors/code/src/tasks.ts b/editors/code/src/tasks.ts index e6239deeb21..d6509d9aa6e 100644 --- a/editors/code/src/tasks.ts +++ b/editors/code/src/tasks.ts @@ -128,7 +128,7 @@ export async function buildCargoTask( name, TASK_SOURCE, exec, - ["$rustc"] + ["$rustc", "$rust-panic"] ); } |
