joel76
joel76

Reputation: 5645

F# with VS Code : Redirecting user input

I use Visual Studio Code 1.37.1, OS Windows 10. I have installed F# with Ionide.

How can I launch the code to redirect user input to a file as I would do with Visual Studio 2019 ("< in.txt" in CommandLineArgs Option of the debugger). Thank you !

Upvotes: 1

Views: 100

Answers (1)

dvitel
dvitel

Reputation: 563

It is related to this and not F# specific. In launch.json

{
    "name": "someName",
    "type": "coreclr",
    "request": "launch",
    "preLaunchTask": "build",
    "program": "${workspaceFolder}/path/to/someName.dll",
    "args": ["<", "${workspaceFolder}/path/to/file.txt"],
    "console": "internalConsole",
}    

works with internalConsole for me.

Upvotes: 3

Related Questions