Using VSCode on Linux, how can I run cargo test
with a backtrace?
Open the menu item at Terminal | Configure Default Build Task
Terminal | Configure Default Build Task
and add an entry to the JSON configuration file as follows:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": "RUST_BACKTRACE=1 cargo test",
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "cargo test with backtrace"
}
]
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.