Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Custom debug variables view
Custom debug variables view [message #1066794] Thu, 04 July 2013 12:05 Go to next message
Tamas Szabo is currently offline Tamas SzaboFriend
Messages: 12
Registered: June 2013
Junior Member
Is it possible somehow to extend the list of variables that are present in the Variables View when the program execution stops at a breakpoint?
Actually I would like to create an own view where I can display the contents of given class instances.
Just to image the way I figured out how to develop something like this:
-My host eclipse (1) is given with a set of plugins which constitue my "product". Part of this product is this debug view, which can be used
naturally one level above this host Eclipse.
-First runtime Eclipse (2), where the view is present.
-Second runtime (started from 2), where I actually want to do something with my product (this is Eclipse instance 3).
In order to be able to use my product, the codebase should be present in the launch configuration of 3 (either by passing the plugins from the
launch config of 2, or the product is entirely present again in the workspace of 2)
If the view is fully developed I will reduce this whole stuff to only 2 levels, because the product will be installed into the host.
From this point this whole thing will look like an ordinary debugging within Eclipse.

I am using the JDI Debug plugins and targets. I was able to create a breakpoint listener and
- Instance 1 is notified when instance 2 stops at a breakpoint. Here I am able to retrieve the StackFrames
- As I saw the interpretation and debugging is done by an external perl program. Does this one provide the StackFrames and their contents?
- Theoretically, what is the ClassLoader - JDIDebugTarget relationship?
- The Class instances I can observe from Instance 1 are not the ones which I want to see, because those come from Instance 3,
but I need to access them at the lowest level because those plugins can contribute to the view in Instance 2.
Re: Custom debug variables view [message #1067221 is a reply to message #1066794] Sun, 07 July 2013 18:35 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
That's a lot of questions to ask in a single post Smile

Regarding extending the Variables View you could look at this plugin from the Object Teams project:
http://git.eclipse.org/c/objectteams/org.eclipse.objectteams.git/tree/plugins/org.eclipse.objectteams.otdt.debug.ui
It contains a view (TeamView) created by subclassing some internal classes from org.eclipse.debug.ui.
Naturally, you'd have to actively maintain that view whenever the internal classes are changed (without notice).

The issue of three stacked Eclipse instances seems to be essentially unrelated.
I don't think any generic technology exists for transitively accessing the debug target of your debug target.
You'll have to first retrieve the values from level 3 into level 2, before level 1 has a chance to see them.
I have no clue where you saw a perl program involved in debugging, but what you describe sounds like three
JVM instances connected via debug protocol. Note that these JVM instances do not directly share any state, objects, classloaders...

HTH,
Stephan

Re: Custom debug variables view [message #1073250 is a reply to message #1067221] Wed, 24 July 2013 11:50 Go to previous message
Tamas Szabo is currently offline Tamas SzaboFriend
Messages: 12
Registered: June 2013
Junior Member
Thanks for the reply and sorry for the huge delay, but I just had the time to look into the code you mentioned. It would be great if you could give me some more hints regarding the code. I saw that you have some listeners for certain kind of breakpoints and retrieve the "this" reference from the JDIThread when the execution stops at a constructor (TeamInstance). Do you just collect these references and display them in the view?
Previous Topic:HorizontalScrollView-related help needed
Next Topic:Menu Location URI/IDs
Goto Forum:
  


Current Time: Fri Mar 29 12:42:14 GMT 2024

Powered by FUDForum. Page generated in 0.04597 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top