Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Message 'No resource manages available' in run dialog


On Dec 7, 2007, at 7:52 AM, Dave Wootton wrote:

Greg
Is there a way for an end user to turn on these trace flags when running eclipse normally rather than invoking a test Eclipse session by a launch
configuration. Would he have to edit the .options file manually?

Manual editing is the only way I think, unless we provide a PTP preference page to do it.



I turned on all the trace options in the trace tab and found that
--debug=1 got passed to my proxy. Are there parameter values other than '1' that can be passed to the proxy? We don't need more, since Rolf and I had previously implemented a debug option in the proxy wizard panels, but
if there are more we could use them.

After much debate with myself :-), I decided to be flexible and allow debug levels, since I knew someone would eventually want it. I've changed the original boolean option to org.eclipse.ptp.core/debug/ proxy/server/debug_level so you can use it to set the level.



If I wanted to add tracing code to my parallel tab class, or other classes using what you've implemented, is there a reference thta explains how to
do it?

No, of course not. :-) Here's the documentation (will add to wiki at some point):

Although it's possible to add per-plugin tracing, I think it's better to keep the options for any packages we distribute centralized in the core plugin. That way if you need to enable tracing for a customer, you only need to ship them one file (.options).

Tracing options are kept in a .options file in the org.eclipse.ptp.core plugin. By default, tracing is enabled (org.eclipse.ptp.core/debug=true), but the individual tracing options are disabled. This forces the tracing options to show up in Tracing tab for an Eclipse Application launch configuration.

Currently tracing options are grouped into 'proxy' and 'rm'. Proxy options relate to the operation of the proxy client and server, and the proxy protocol. Rm options relate to resource managers.

The org.eclipse.ptp.core.util.DebugUtil class manages the options. When the org.eclipse.ptp.core plugin loads, the DebugUtil.configurePluginDebugOptions() method is called. This reads the state of the tracing options and sets static fields to the corresponding values. It's then up to the plugin code to check against the corresponding field to test if tracing is enabled or not.

To add a new tracing option:

1. Add the option to the appropriate category in the .options file.

2. Add the corresponding option string to the DebugUtil class.

3. Add a static field to DebugUtil that corresponds to the option.

4. Modify DebugUtil.configurePluginDebugOptions() to get the option and set the appropriate value of the field.

The proxy protocol option is slightly more complicated, because the org.eclipse.ptp.proxy.protocol plugin is intended to run without Eclipse (it has no dependencies on Eclipse plugins). This means that it's not possible to reference DebugUtil directly. To deal with this, the plugin has it's own debug options which are defined in org.eclipse.ptp.proxy.util.DebugOptions, and these options must passed to the proxy client code when the client is created. This happens in the constructor for AbstractRemoteProxyRuntimeClient which converts the options specified by DebugUtil (as supplied by the .options file) into DebugOptions.



Thanks
Dave



Greg Watson <g.watson@xxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
12/05/2007 04:40 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc

Subject
Re: [ptp-dev] Message 'No resource manages available' in run dialog







On Dec 4, 2007, at 12:11 PM, Greg Watson wrote:


On Dec 4, 2007, at 11:55 AM, Dave Wootton wrote:

Greg
It looks like the 'no resource manager' problem is fixed now. I
think the
invalid queue message was a side effect of the no resource manager
message, and might have been my code trying to save a launch
configuration
when it wasn't supposed to.

I've tride again today to get the NumberFormatException and see the
packet
trace you added. However, I'm not having any luck getting the error
today.
I'll try a few more times and if it still doesn't fail then I'll just
watch for the failure.

This trace looks like it might be useful if we ever have to debug
some
front end/proxy communication problem. Is there an easy way to
leave this
in the code and have it controlled by a preference or proxy setting,
default off?

Not at the moment, but I'd like to make it a preference setting or
at least enabled via the runtime eclipse tracing mechanism. I need
to figure out how the latter works first though.

I've added support for this now. Debugging can be enabled thought the
'tracing' tab when creating a runtime eclipse launch configuration, or
you can manually edit the '.options' file in the org.eclipse.ptp.core
plugin.

Greg
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top