在Linux上使用VSCode,我如何用回溯运行cargo test
?
打开Terminal | Configure Default Build Task
的菜单项,在JSON配置文件中添加如下条目:
{
"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"
}
]
}