I am using VS Code to play with Rust. So far I have been unable to configure redirection of stdin from a file ("<", "in.txt" in args of launch.json).
I tried this launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Launch",
"program": "${workspaceFolder}/target/debug/first.exe",
"args":["<", "in.txt"],
"cwd": "${workspaceFolder}",
"console":"integratedTerminal"
}
]
}
I tried also
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'first'",
"cargo": {
"args": [
"build",
"--bin=first",
"--package=first"
],
"filter": {
"name": "first",
"kind": "bin"
}
},
"args": ["<", "in.txt"],
"cwd": "${workspaceFolder}",
"console" : "integratedTerminal"
}
]
}
But nothing works.