How to show colored console output in Clion

后端 未结 2 1946
遥遥无期
遥遥无期 2021-01-18 19:26

I am trying to write a C++ application with Clion that makes use of colored console output using ASCII sequences. When I run the program in Clion, the colors are not shown.

2条回答
  •  后悔当初
    2021-01-18 20:11

    CLion's console is not a terminal (at least yet), but nothings prevents from interpreting the control codes related to color and highlight the text accordingly. This is exactly what happens when you trigger a CMake build, for example.

    Unfortunately, this has not been implemented for launching the applications themselves. Feature request is here: https://youtrack.jetbrains.com/issue/CPP-2471

提交回复
热议问题