Colorize console output in Intellij products

后端 未结 5 802
Happy的楠姐
Happy的楠姐 2020-11-29 19:53

I have a custom script with a default output. I\'d like to colorize errors, warnings and infos. There\'s a way to do that in Intellij products (IDEA, PhpStorm, PyCharm)?

相关标签:
5条回答
  • 2020-11-29 20:35

    The colors configurations, mentioned in the other responses, work, if you run a regular application, if you set the following VM option:

    -Dspring.output.ansi.enabled=ALWAYS
    
    0 讨论(0)
  • 2020-11-29 20:38

    It has been a while, but in case you are still interested, there is a new plugin for console colorizing: Grep Console.

    Colorized build output in IntelliJ

    Works nicely with Intellij 12.
    Make sure you restart IntelliJ after installing the plugin. After you will see the plugin icon in the top left corner (white-red icon).

    0 讨论(0)
  • 2020-11-29 20:42

    Latest IntelliJ, PyCharm and PhpStorm have limited support for console output colorization.

    Preferences > Editor > Colors & Fonts > Console Colors

    enter image description here

    0 讨论(0)
  • 2020-11-29 20:47

    If you are using spring boot, use Spring Boot to start your application instead of general application. Color will show up. No need to do anything else. It works for me.

    0 讨论(0)
  • 2020-11-29 20:55

    It's not supported right now (at least not for all the run configuration types). Please vote for:

    • IDEA-23976 Add ability to color/highlight console output
    • IDEA-69880 Support for colors in console output

    Console output of the external tools is fixed to supports ANSI escape sequences to color text.

    0 讨论(0)
提交回复
热议问题