VSCode 一键运行 Rust

46 字
1 分钟
VSCode 一键运行 Rust
{
"key": "f5",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "cargo run\u000D"
},
"when": "inRustProject"
}

添加到 Keybinding.json 中

https://stackoverflow.com/questions/72925072/how-to-create-a-shortcut-to-build-and-run-rust-code-from-inside-vs-code

同时修改 CMake 拓展的快捷键防止冲突

{
"key": "f5",
"command": "cmake.launchTarget",
"when": "resourceLangId cpp || resourceLangId c"
}
VSCode 一键运行 Rust
https://nekoside.com/posts/vscode-run-rust/
作者
nekoside
发布于
2025-09-05
许可协议
CC BY-NC-SA 4.0

当前页面没有目录

文章目录

当前页面没有目录