CLion standard input while debugging

后端 未结 4 1204
[愿得一人]
[愿得一人] 2021-02-03 23:41

What I\'m trying to do is basically:

./myProgram < myData.txt

While I\'m debugging with CLion IDE. I just can\'t find the option to do so.

<
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-03 23:55

    As of CLion 2020.1 this feature is built in:

    Input redirection

    If you need to redirect input from a file to the stdin of your application, you can now do that. Use a new field in the configuration called Redirect input from. Enter:

    • A relative path (CLion will prepend with the Working directory path).
    • An absolute path (will be remapped for remote configurations).
    • Or macros (like FilePrompt).

提交回复
热议问题