Have "rust: cargo build" task work on global level (Not just for workspace) #18425
trymeouteh
started this conversation in
Ideas
Replies: 1 comment
-
Hello @trymeouteh, {
... // rest of your configuration
]
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "Rust",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}",
"preLaunchTask": "cargo build"
}
]
}
} Notice that I modified After this all you have to do is add a global task using {
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "cargo build",
"type": "shell",
"command": "cargo build",
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
"isDefault": true
},
}
]
} After this, you can run your global Debug builds in every workspace. Hope this helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was able to create this debug launch config for my workspace by adding this config in
.vscode/launch.json
And it works!
However I want to use the same debug launch config everywhere. I added this config in the global
settings.json
file and when I run the Rust debug config, I get the following popup errorPlease add this task and perhaps other tasks to allow this simple debug config to work globally.
Beta Was this translation helpful? Give feedback.
All reactions