rust debug your application by specifying parameters
To ensure that you can specify program argument - for example when you're writing a console app that requires command argument you can use the following settings to allow vscode + rust anaylzer pick these up during debug.
Here I specify "-t www.google.com" as the argument.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'nwt'",
"cargo": {
"args": [
"build",
"--bin=nwt",
"--package=nwt",
],
"filter": {
"name": "nwt",
"kind": "bin"
}
},
"args": ["-t www.google.com"],
"cwd": "${workspaceFolder}"
},
]
}
Comments