Intellij控制台输出 [英] Intellij Console output

查看:254
本文介绍了Intellij控制台输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一段简单代码的输出:

Here is an output to a simple piece of code:

/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java "-
javaagent:/Applications/IntelliJ IDEA 
CE.app/Contents/lib/idea_rt.jar=63996:/Applications/IntelliJ IDEA 
CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath 
/Users/Ice/IdeaProjects/HelloWorld/out/production/HelloWorld hello

Dice roller, how many dice?
2
Dice number =: 2

Process finished with exit code 0

我如何从控制台输出的开头删除烦人的路径,因为我不知道要搜索的关键字,因此很难找到该问题的答案。

How do i remove the annoying path from the begining of the console output, i have a very hard time searching for an answer to this question as i do not know the keywords to search for.

推荐答案

您不能禁用命令行打印,但是可以按如下所示折叠它:

You cannot disable printing of the command line however you can fold it as follows:


  • 在控制台中右键单击该行

  • 选择像这样折叠行

  • 命中 OK (可选,您可以自定义模式,例如,折叠所有以 / Library / Java / JavaVirtualMachines开头的行)

  • Right click on that line in the console
  • Choose Fold Lines Like This
  • Hit OK (optionally, you can customise the pattern to, for example, fold all lines that start with: "/Library/Java/JavaVirtualMachines")

折线仍出现在控制台中,但它们不会控制控制台输出或模糊输出,这对您来说更重要,即折叠是改善信噪比的一种方法。

Folded lines still appear in the console but they do not dominate the console output or obscure output which is more important to you i.e. folding is a way to improve the signal:noise ratio.

如果折叠对您有所帮助,则您可能希望使用 Grep控制台(请参阅@Meo的评论),因为它带有一些内置的在折叠配置中(以及允许您定义自己的配置),其日志文件突出显示和过滤功能可用于大大提高信噪比。

If folding is helpful to you then you might want to consider using Grep Console (see @Meo's comment) because it comes with some built in fold configurations (aswell as allowing you to define your own) and its log file highlighting and filtering features can be used to greatly improve the signal:noise ratio.

这篇关于Intellij控制台输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆