为什么我的plugin不work了

本文详细介绍了如何在Eclipse中查看log以及如何启用OSGi console进行系统状态调查,包括设置debug参数、配置options文件以及使用console参数等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看eclipse的log。

如何查看呢?

eclipse -vm c:\jdks\java_1.4.2_06\jre\bin\java.exe -console -consoleLog -debug -vmargs -Xmx384M

Gathering Information About Your Plug-in

http://www.eclipse.org/eclipse/platform-core/documents/3.1/debug.html


-debug options_file_full_path
if set to a non-null value, the platform is put in debug mode. If the value is a string it is interpreted as the location of the .options file. This file indicates what debug points

如果有debug,那么platform将进入debug模式。options_file_full_path是options文件的全路径。这个文件会给出哪些plugin的debug参数被设置成true,哪些debug参数

are available for a plug-in and whether or not they are enabled. If a location is not specified, the platform searches for the .options file under the install directory.

被设置成false。如果没有设置options_file_full_path,platform将在安装目录下面找.options文件。

-consolelog
if "true", any log output is also sent to Java's System.out (typically back to the command shell if any). Handy when combined with -debug 

如果设置了该参数,任何输出到log文件的log都会被输出到命令行。它和-debug参数一起使用很方便。
-console
if set to a non-null value, the OSGi console (if installed) is enabled. This is handy for investigating the state of the system. If the value is a suitable integer, it is interpreted

如果设置了该参数,OSGi的console会被打开(前提是OSG已经安装)。这个参数用来调查系统状态很好用。如果设置了端口好,

as the port on which the console listens and directs its output to the given port. If the value is not a suitable integer (including the empty string) then the console will listen 

会监听这个端口,然后将输出重定向到给定的端口中去,如果没有指定端口

System.in and direct its output to System.out.

console将会在System.in上获得输入,然后在System.out上输出


http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html

将osgi中的所有debug参数设置成true的options文件:

#Master Tracing Options
#Fri Oct 19 15:59:34 CST 2012
org.eclipse.osgi/debug=true
org.eclipse.osgi/monitor/resources=true
org.eclipse.osgi/debug/messageBundles=true
org.eclipse.osgi/debug/objectPool/adds=true
org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver=true
org.eclipse.osgi/profile/debug=true
org.eclipse.osgi/debug/services=true
org.eclipse.osgi/resolver/generics=true
org.eclipse.osgi/eclipseadaptor/debug=true
org.eclipse.osgi/monitor/classes=true
org.eclipse.osgi/eclipseadaptor/debug/location=true
org.eclipse.osgi/eclipseadaptor/debug/cachedmanifest=true
org.eclipse.osgi/resolver/requires=true
org.eclipse.osgi/profile/startup=true
org.eclipse.osgi/monitor/activation=true
org.eclipse.osgi/resolver/cycles=true
org.eclipse.osgi/eclipseadaptor/converter/debug=true
org.eclipse.osgi/resolver/imports=true
org.eclipse.osgi/defaultprofile/logsynchronously=true
org.eclipse.osgi/resolver/wiring=true
org.eclipse.osgi/defaultprofile/logfilename=
org.eclipse.osgi/debug/startlevel=true
org.eclipse.osgi/defaultprofile/buffersize=256
org.eclipse.osgi/debug/manifest=true
org.eclipse.osgi/trace/activation=true
org.eclipse.osgi/debug/packageadmin=true
org.eclipse.osgi/debug/security=true
org.eclipse.osgi/trace/filename=runtime.traces
org.eclipse.osgi/resolver/debug=true
org.eclipse.osgi/resolver/uses=true
org.eclipse.osgi/trace/filters=trace.properties
org.eclipse.osgi/debug/objectPool/dups=true
org.eclipse.osgi/debug/bundleTime=true
org.eclipse.osgi/profile/impl=org.eclipse.osgi.internal.profile.DefaultProfileLogger
org.eclipse.osgi/debug/filter=true
org.eclipse.osgi/debug/loader=true
org.eclipse.osgi/debug/events=true
org.eclipse.osgi/trace/classLoading=true
org.eclipse.osgi/profile/benchmark=true
org.eclipse.osgi/eclipseadaptor/debug/platformadmin=true

如果想试一试-console <port>,请参见:

http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.wlp.nd.doc%2Ftopics%2Ftwlp_setup_osgi_console.html
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值