Accessing Debugging Information [message #703735] |
Wed, 27 July 2011 17:30  |
Eclipse User |
|
|
|
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.
Thanks,
Jimmy
|
|
|
Re: Accessing Debugging Information [message #713407 is a reply to message #703735] |
Mon, 08 August 2011 08:52  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02955 seconds