简体   繁体   English

我在 intellij idea 中启动插件后,System.err.println 语句未打印在控制台上

[英]System.err.println statements not getting printed on console after i launch my plugin in intellij idea

I am really finding it difficult to even frame this question.我真的发现很难提出这个问题。 But i will try to explain this in detail.但我会尽量详细解释这一点。

I have created a plugin using gradle in Intellij Idea.我在 Intellij Idea 中使用 gradle 创建了一个插件。 What it does is, checks 2 json files and prints error, according to some logic.它的作用是,根据某种逻辑检查 2 个 json 文件并打印错误。 All is working well.一切正常。 As soon as i create a jar file of this plugin and do "install plugin from disk" in settings, and then launch plugin, it is not printing System.err.println statements on console, where i am in. Also i see is, idea log files is generating those print statements but not printing on console.一旦我创建了这个插件的 jar 文件并在设置中“从磁盘安装插件”,然后启动插件,它就不会在控制台上打印 System.err.println 语句,我所在的位置。我还看到,想法日志文件正在生成这些打印语句,但不在控制台上打印。 Just wanted to know if someone has ever faced such issue, or can help me out.只是想知道是否有人遇到过这样的问题,或者可以帮助我。 It would be great.那会很好。 Thank you.谢谢你。

Your plugin does not have the access to input/output streams of the JVM process when you are executing it.当您执行插件时,您的插件无权访问 JVM 进程的输入/输出流。

You can create a dialog/notification as per this IntelliJ's guide您可以按照此 IntelliJ 指南创建对话框/通知

OR或者

This thread shows steps needed in creating your own text console . 该线程显示了创建您自己的文本控制台所需的步骤

HTH HTH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM