sending EOF to stdin in Clion IDE

前端 未结 2 643
暖寄归人
暖寄归人 2020-12-06 00:44

Is there a way to send EOF to stdin when running a c program in Clion IDE? I tried ctrl+D - it simply shuts the program down. Ctrl+Z doesn\'t work either. Any ideas?

2条回答
  •  孤街浪徒
    2020-12-06 01:05

    Another option is to run the program from command line, and attach to it from CLion. In that case, you'll have your native shell.

    It's detailed at https://blog.jetbrains.com/clion/2016/01/attach-to-local-process/

    The process is very simple - after running the program from command line, choose Run->Attach to Local Process...

    And choose your program from the list. You can type in the search field.

提交回复
热议问题