1

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 !

rmunn
  • 34,942
  • 10
  • 74
  • 105
joel76
  • 5,565
  • 1
  • 18
  • 22

1 Answers1

3

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.

dvitel
  • 563
  • 3
  • 10
  • Thank you but unfortunately that doesn't work.for me. Perhaps I should learn how to use correctly VS Code before !!I – joel76 Aug 25 '19 at 22:08
  • @joel76 - See https://stackoverflow.com/questions/32863807/visual-studio-code-redirect-input-on-debug - apparently you need to make the `console` parameter be something other than `internalConsole`. I've seen `integratedTerminal` and `externalTerminal` suggested. Do either of those work? – rmunn Aug 26 '19 at 04:20