如何在Eclipse中获取平台插件的日志 [英] How to get the logs of platform plugins in eclipse

查看:222
本文介绍了如何在Eclipse中获取平台插件的日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是eclipse插件开发的新手。我想在我的插件中自定义一些Eclipse功能。所以我想知道,当我在Eclipse中执行某些操作时,在后台会发生什么。例如,文件->新建->项目。我需要调用哪个插件/类/函数的日志/踪迹?

I am new to eclipse plugin development. I would like to customise some of the eclipse functionalities in my plugin. So I would like to know, what happens in the background when I do some operation in eclipse. For e.g., File->New->Project. I need the logs/Trace of which plugin/Class/Function is called?

推荐答案

您可以使用 -debug<选项文件的路径> 参数指定调试选项文件的路径,该文件用于启用各种调试跟踪选项。您可能还想使用 -consoleLog 参数。

You can use the -debug <path to options file> argument when you start Eclipse to specify the path of a debug options file which is used to enable various debug tracing options. You may also want to use the -consoleLog argument.

一个示例选项文件为:

# Turn on debugging for the org.eclipse.ui plugin.
org.eclipse.ui/debug=true

# Show all jobs in dialogs and the progress view including the support jobs
org.eclipse.ui/debug/showAllJobs=true

# Report if a stale job was found
org.eclipse.ui/debug/job.stale=true

在此情况下, org.eclipse.ui / debug = true 行启用特定插件的调试> org.eclipse.ui 。其他行启用单独的调试选项。

The org.eclipse.ui/debug=true line enables debugging for a particular plugin in this case org.eclipse.ui. The other lines enable individual debugging options.

这些选项有数百种,按照惯例,大多数插件都包含 .options

There are hundreds of these options, by convention most plugins include a .options file in the plugin jar listing the options that the plugin supports.

如最近Eclipse版本中的注释中所述,调试跟踪选项也可在首选项中找到。 常规>跟踪,然后在启动配置的跟踪选项卡上。

As mentioned in the comments in recent releases of Eclipse the debug tracing options are also available in the Preferences in 'General > Tracing' and on the Tracing tab of Launch Configurations.

您还可以使用插件间谍找出正在显示对话框的类。安装此工具后,可以在显示对话框获取信息时按Alt + Shift + F1。如果您安装了Eclipse源代码插件,则可以直接转到源代码。有关更多信息,请参见 Eclipse源代码教程。

You can also use 'plug-in spy' to find out the class which is displaying a dialog. Once this is installed you can press Alt+Shift+F1 when a dialog is displayed to get information. If you have the Eclipse source code plugins installed you can then go directly to the source code. For more information see Eclipse Source Code tutorial.

这篇关于如何在Eclipse中获取平台插件的日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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