Search code examples
http-redirectclion

How clion redirects output by setting the configuration


I want to use clion to redirect the output to a specified file, but I don't want to configure it in the code, for example, by setting it via freopen. Previously I was redirecting via freopen, but this way every time I submit the code on oj, I need to comment the freopen code, which is very inconvenient

enter image description here enter image description here I can't find the relevant configuration in clion's configuration


Solution

  • Sorry, but currenly CLion has no this functionality. >MyOutput.txt in Program arguments does nothing because CLion don't run it through a shell, which normally would be responsible for setting up the redirection from the command line.

    Please, vote CPP-3379 Add an option to redirect program output and error streams to a file