Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Accessing Debugging Information
Accessing Debugging Information [message #703735] Wed, 27 July 2011 21:30 Go to next message
Jimmy L is currently offline Jimmy LFriend
Messages: 1
Registered: July 2011
Junior Member
I am new to writing Eclipse plugins, and I am trying create a java debugging plugin. I know that I can listen for breakpoint notification using the org.eclipse.jdt.debug.breakpointListeners extension point. However, I need help with the following.

Suppose that a breakpoint is hit and my listener is called.

1. How do I get the list of threads and how do I find out which thread the breakpoint is in? I guess a better question might be, how do I access stack frame information?

2. How do I get the line of code to which the current breakpoint is attached?

3. How do I get the list of variables and their values?

4. How do I tell jdt to step-in and step-over?

I don't know which jdt classes I should be using, so I'd appreciate it if someone can point me in the right direction.


Re: Accessing Debugging Information [message #713407 is a reply to message #703735] Mon, 08 August 2011 12:52 Go to previous message
Andrey  is currently offline Andrey Friend
Messages: 4
Registered: April 2011
Junior Member
Check an ibm site. I would place here couple of links, but not allowed to do it as it turned out.

Also check out JDT plugin developer guide.

The way I am going through to investigate JDT: I got all org.eclipse.jdt.* from repository.I am reading the sources and debugging debugger.

Breakpoints mechanism works through the resource marker's. org.eclipse.jdt.ui.CompilationUnitEditor/org.eclipse.jdt.ui.ClassFileEditor - these editors adds breakpoint markers to java file. Then when virtual machine is started, debug platform creates requests to virtual machine for VM suspending, when some breakpoint is hit. Once VM is suspended you can obtain stack frame and then get method through the stack frame and query local variables from methods. But all said above is very abstract description.
Low level communication between VM and eclipse is done via implementation of JDI (in org.eclipse.jdt.debug).
Your questions are quite vast. There dozens of classes involved in process you ask about.
Previous Topic:autocomplete not acting as I expect
Next Topic:Programatically setting Javadoc and Source
Goto Forum:

Current Time: Sun Jun 24 09:38:43 GMT 2018

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

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

Back to the top