I need to prepare a number of exercises for student learning Rust. I've found the use of ${workspaceFolderBasename}
within the program
field of my launch.json
to be quite useful, as in:
"program": "${workspaceFolder}/target/debug/${workspaceFolderBasename}.exe"
This allows me to execute the program using CTRL+F5
. However, this only works while the resulting executable has the same name as the workspace folder (i.e. ${workspaceFolderBasename}
). I note that the name
field in my project's Cargo.toml
file has a name
field under [package]
which controls the name of the resulting executable. Is there a way to use this field within launch.json
?