与 Eclipse 交互的程序

发布于 2024-12-08 05:34:06 字数 204 浏览 2 评论 0原文

我目前正在开发一个日志系统,在调试其他一些记录用户操作、错误等的系统时使用该系统,它可以在出现错误时保存堆栈跟踪。 我希望能够使用堆栈跟踪跳转到代码中的特定行,或者至少跳转到 Eclipse 中的正确文件(如果 Eclipse 打开,就像在控制台中打印堆栈跟踪时可以执行的那样),有什么方法可以做到这一点吗?除了将堆栈跟踪打印回 Eclipse 控制台(最好是直接从我的系统)之外,还有可能吗?

I am currently working on a log system that is used when debugging some other systems that logs user actions, errors etc, it saves the stack trace in case of error.
I would like to be able to use the stack trace to jump to a specific line in the code or at least the right file in eclipse if eclipse is open like you can do when a stack trace is printed in console, is there any way this is possible other than printing the stack trace back out to the eclipse console, preferably directly from my system?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吃颗糖壮壮胆 2024-12-15 05:34:06

您可以使用 Eclipse 控制台视图,有一个选项可以创建 Java 堆栈跟踪控制台 您可以在其中粘贴堆栈跟踪,然后导航到代码。

或者,如果您想在 Eclipse 中实现自己的插件,您可以在用户单击 Web 浏览器或外部应用程序中的堆栈跟踪时侦听某个本地端口并导航到代码。

You can use Eclipse console view, there is an option to create Java Stack Trace Console where you can paste your stack trace and then navigate to the code.

Alternatively, if you want to implement your own plugin within Eclipse, you can listen on some local port and navigate to the code, when user clicks on a stack trace in a web browser or an external application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文