'Input from external file doesn't work with Microsoft Python VS Code extension while debugging
While debugging, I am trying to read input from external file as advised in the VS Code docs here (by adding "args" : ["<", "input.txt"] to launch.json). It doesn't work as the redirect ("<") is automatically escaped (prepended with "\") by the Microsoft's Python extension (see the console output below).
cd /workspaces/pyt ; /usr/bin/env /usr/local/bin/python /home/vscode/.vscode-server/extensions/ms-python.python-2022.7.11332232/pythonFiles/lib/python/debugpy/launcher 41587 -- /workspaces/pyt/test.py \< input.txt
This way of reading input from external file does work with other VS Code extensions, for example with C/C++. Is there any way to make it work with the Python extension (while debugging)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
