0

I have a program and want to test it with a large amount of inputs that have saved in a text file. Is there a way I can do this within VS code? I have already tried modifying launch.json to this:

    {
    // 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": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args" : [ "< C:\\file\\path\\testcase.txt"]
        }
    ]
}

EDIT: I have changed to:

   "args" : [ "<", "${workspaceFolder}/testcase.txt"]

but it still isn't receiving input from the file.

Kronos
  • 126
  • 8
  • [Visual Studio Code use input text file on debug](https://stackoverflow.com/a/63252402) – 001 Oct 13 '21 at 13:56
  • @JohnnyMopp My launch.json already has the console tag. I rearranged the args array as shown there but the program still waits for input instead of receiving it from the file. – Kronos Oct 13 '21 at 14:19

0 Answers0