| Summary: | resume, suspend and step not enabled/disabled during stepping | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mike Thyer <MikeThyer> | ||||
| Component: | Debug | Assignee: | Pawel Piech <pawel.1.piech> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | darin.eclipse, john.cortell, pawel.1.piech | ||||
| Version: | 3.3.1 | ||||||
| Target Milestone: | 3.4 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
*** Bug 224771 has been marked as a duplicate of this bug. *** Will investigate for M7. We want to avoid updating actions uneccessarily (i.e. when a step completes immediately). Updating on the timeout seems fair - but we also need to be careful not to re-retrieve stack frames (as they likely are not available while a thread is stepping). We used to collapse the frames on a timeout, but I prefer to have the stack frames remain expanded/visible. (In reply to comment #0) > protected void handleSuspendTimeout(DebugEvent event) { > fireDelta((IDebugTarget) event.getSource(), IModelDelta.CONTENT | > IModelDelta.STATE | IModelDelta.SELECT); > } This change will indeed refresh the stack frame, but won't it also cause the debug target to be selected? Unfortunately, if the SELECT flag is not set, I don't think the actions will be notified. I filed bug 162595 in 3.3 cycle about this problem but my proposed solution was deemed risky. Still, in our product we patched for this bug and haven't seen any adverse effects. I agree - we should look for a good solution that does not have adverse side effects (not neccessarily the fix shown here). The IModelDelta.SELECT is overkill. The reason it fixes the problem is that a selection event results in the view's actions being updated. Seems to me all we have to do is ensure the platform updates the actions in addition to causing a refresh of the viewer in the suspend timeout logic. Perhaps I'm overlooking something. Created attachment 97484 [details] patch This patch updates the active debug context's state when a parent element changes state. I think this will also fix bug 162595. Note - this does not change existing the model proxy's - it just changes the debug view processing of the delta. Released fix to HEAD. Please verify, Pawel. *** Bug 162595 has been marked as a duplicate of this bug. *** Verified :-) |
Build ID: M20071023-1652 Steps To Reproduce: 1. write a progam with an empty infinite loop 2. step into the loop 3. look at the state of the Debug toolbar icons and Run menu items More information: This problems occurs both when debugging Java and C. Clicking on any of the stack entries in the Debug view causes the debug commands (resume,suspend,step) to be enabled/disabled correctly. The bug seems to be in the handling of suspend timeouts, an insufficiently thorough refresh of the Debug view is being performed. Adding the following override function to DebugTargetEventHandler fixes the problem: protected void handleSuspendTimeout(DebugEvent event) { fireDelta((IDebugTarget) event.getSource(), IModelDelta.CONTENT | IModelDelta.STATE | IModelDelta.SELECT); }