Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse Plugin - Debugger - Automatically select the top stackframe
Eclipse Plugin - Debugger - Automatically select the top stackframe [message #643977] Wed, 08 December 2010 21:19 Go to next message
ncl  is currently offline ncl Friend
Messages: 6
Registered: December 2010
Junior Member
Hello,

I posted this in the "Newcomers" section, but was redirected here.
I'm writing a debugger as an eclipse plugin (using eclipse 3.6.1, windows XP and 7). Everything seems to work except for one thing: when a breakpoint is hit, or after a step, the top stack frame is not selected automatically (and thus, the associated source line is not highlighted). And, if I select it manually, after each step/continue, I have to select it again.
When the stack frame is manually selected, the correct source line is highlighted.
When a breakpoint is hit, I fire a DebugEvent with kind = DebugEvent.SUSPEND, detail = DebugEvent.BREAKPOINT. The source of the debug event is set to the thread in which the breakpoint is set.

After looking on the internet, I found these 2 links that did'nt help:
- http://dev.eclipse.org/mhonarc/lists/platform-debug-dev/msg0 1111.html
I have a source locator, a debug model presentation, and a text editor and they seem to work correctly since clicking on the stack frame highlights the correct source line.

- http://dev.eclipse.org/mhonarc/lists/platform-debug-dev/msg0 1249.html
After stepping in the eclipse source code, I arrive in ThreadEventHandler#fireDeltaUpdatingSelectedFrame which sets the IModelDelta.SELECT flag in the delta.


I've tried looking around a little more but I am not familiar enough with eclipse and its source. The farthest I could go was from TreeModelContentProvider#handleSelect to TreeModelViewer#internalExpand(Object, bool). The Object is the correct TreePath and the boolean is set to false.
In internal expand, the parent is asked to create the child widget (createChildren(pw)) but then, internalFindChild(pw,element) returns null. The parent widget does have a child but the child's data member is set to null.

Any idea ? What am I doing wrong ?

Thanks in advance.
Re: Eclipse Plugin - Debugger - Automatically select the top stackframe [message #644632 is a reply to message #643977] Mon, 13 December 2010 14:48 Go to previous messageGo to next message
ncl  is currently offline ncl Friend
Messages: 6
Registered: December 2010
Junior Member
I'll reply to myself Smile In case anyone else has the same problem.
In my case, I forgot to define a correct "equals" method for the stackframe. Now breakpoints are working correctly.
Step actions on the other hand are still not functioning properly...
Re: Eclipse Plugin - Debugger - Automatically select the top stackframe [message #648854 is a reply to message #644632] Fri, 14 January 2011 18:03 Go to previous messageGo to next message
Lisa Jett is currently offline Lisa JettFriend
Messages: 14
Registered: July 2009
Junior Member
I am having a similar problem...can you point me to the area in the debugger platform code that utilizes the equals function you had to add?
Re: Eclipse Plugin - Debugger - Automatically select the top stackframe [message #780675 is a reply to message #648854] Wed, 18 January 2012 23:42 Go to previous message
J. S. Pam is currently offline J. S. PamFriend
Messages: 3
Registered: January 2012
Junior Member
I also had a similar problem, and none of the solutions posted here and elsewhere worked. After much playing around, I found the cause: I was launching my interpreter (which is not an external program, but only a separate thread) using DebugPlugin.asyncExec(). This caused the debug event dispatch to be delayed until the interpreter finished executing.

It worked perfectly fine after deriving the interpreter runner from the Job class and using Job.schedule().
Previous Topic:SWT: try to hide/show widgets without success
Next Topic:Eclipse hotkey for the mouse double click?
Goto Forum:
  


Current Time: Sat Dec 20 19:35:54 GMT 2014

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

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