-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I'd love to have something like this http://stackoverflow.com/questions/32863807/visual-studio-code-redirect-input-on-debug without a workaround. That is, ability to redirect input from a given file, when debugging.
I have tried to add arg option in launch.json,
"configurations": [
{
"name": "Python: Debug",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": ["<",
"input.txt"
]
}
]
but the launch command doesn't work as usual. The terminal hangs and after I type enter, I got a exception.
Exception has occurred: ValueError
invalid literal for int() with base 10: '
The python script:
n = int(input())
print(n)
The input.txt content:
5
Is there any suggestion?
sgrade
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request