【问题标题】:How to get rid of the extra messages that show up in terminal window of VS Code while running java file?运行java文件时如何摆脱VS Code终端窗口中显示的额外消息?
【发布时间】:2021-08-12 07:11:22
【问题描述】:

最近我安装了 VS code 并下载了 JAVA 的编码包。但是当我运行一个 hello world 打印代码时,我看到了许多其他信息,这些信息显示在终端窗口中。我该如何防止这种情况发生。下图解释了我的问题:

我想摆脱这些消息并只打印 hello world

【问题讨论】:

    标签: java visual-studio-code


    【解决方案1】:

    终端中没有禁用执行脚本的此类设置,但我们有一些解决方法。

    1.创建launch.json并设置"console": "internalConsole",。然后Run without Debugging,结果会显示在Debug Console中并且没有执行脚本:

    2.在launch.json中,设置"console": "externalTerminal",。然后Run without Debugging,结果会显示在外部终端并且没有执行脚本:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-03
      • 2022-08-11
      • 2023-03-16
      • 1970-01-01
      相关资源
      最近更新 更多