Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsAccessing Debugging Information
https://www.eclipse.org/forums/index.php/mv/msg/225637/703735/#msg_703735
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]]>Jimmy L2011-07-27T21:30:21-00:00Re: Accessing Debugging Information
https://www.eclipse.org/forums/index.php/mv/msg/225637/713407/#msg_713407
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.
]]>Andrey 2011-08-08T12:52:06-00:00