rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Have "rust: cargo build" task work on global level (Not just for workspace)

Open trymeouteh opened this issue 1 year ago • 0 comments

I was able to create this debug launch config for my workspace by adding this config in .vscode/launch.json

{
	"name": "Rust",
	"type": "lldb",
	"request": "launch",
	"program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}",
	"preLaunchTask": "rust: cargo build"
}

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 error

Could not find the task 'rust: cargo build'

Please add this task and perhaps other tasks to allow this simple debug config to work globally.

trymeouteh avatar Oct 07 '24 21:10 trymeouteh