Community
Participate
Working Groups
Steps to reproduce: 1. Start Eclipse in C/C++ perspective and set "Windows->Preferences->Run/Debug->Perspectives->Open the associated perspective when an application suspends" option to "Prompt". 2. Open the Debug view 3. Start a debug session. 4. The "Confirm Perspective Switch" dialog will appear. Wait until the Debug view is fully populated and press "Yes". The debugger related actions (Run To Line, Resume At Line, Move To Line, Add Watch Expression) are not is the editor's context menu as expected. Selecting an entry in the Debug view will make them appear. The reason this is happening is at some point when the perspectives are switching the selection in the Debug view is reset. This results in the reseting of "debuggerActive" property in 'EvaluationContextManager' which controls the visibility of the debugger actions.
Created attachment 203781 [details] Proposed fix.
It seems on perspective switch an empty selection change for the Debug View gets triggered by the Debug View Breadcrumb, even though it is not visible. This could also be related to bug 358382. Thread [main] (Suspended (breakpoint at line 230 in EvaluationContextManager)) EvaluationContextManager.removeContext(IWorkbenchPage) line: 230 EvaluationContextManager.selectionChanged(IWorkbenchPart, ISelection) line: 154 AbstractPartSelectionTracker$1.run() line: 119 SafeRunner.run(ISafeRunnable) line: 42 Platform.run(ISafeRunnable) line: 888 PagePartSelectionTracker(AbstractPartSelectionTracker).fireSelection(IWorkbenchPart, ISelection) line: 117 PagePartSelectionTracker$1.selectionChanged(SelectionChangedEvent) line: 49 PageBookView$5.run() line: 255 SafeRunner.run(ISafeRunnable) line: 42 Platform.run(ISafeRunnable) line: 888 PageBookView$SelectionManager.selectionChanged(SelectionChangedEvent) line: 253 PageBookView$SelectionProvider.selectionChanged(SelectionChangedEvent) line: 319 LaunchView(PageBookView).pageSelectionChanged(SelectionChangedEvent) line: 896 PageBookView.access$2(PageBookView, SelectionChangedEvent) line: 891 PageBookView$2.selectionChanged(SelectionChangedEvent) line: 163 Viewer$2.run() line: 164 SafeRunner.run(ISafeRunnable) line: 42 JFaceUtil$1.run(ISafeRunnable) line: 49 SafeRunnable.run(ISafeRunnable) line: 175 LaunchViewBreadcrumb$1(Viewer).fireSelectionChanged(SelectionChangedEvent) line: 162 LaunchViewBreadcrumb$1(StructuredViewer).updateSelection(ISelection) line: 2188 LaunchViewBreadcrumb$1(StructuredViewer).setSelection(ISelection, boolean) line: 1725 LaunchViewBreadcrumb$1(Viewer).setSelection(ISelection) line: 394 LaunchViewBreadcrumb.debugContextChanged(DebugContextEvent) line: 317 LaunchView.showBreadcrumbPage() line: 801 LaunchView.autoSelectViewPage(Composite) line: 764 LaunchView.access$3(LaunchView, Composite) line: 756 LaunchView$3.controlResized(ControlEvent) line: 616 TypedListener.handleEvent(Event) line: 234 EventTable.sendEvent(Event) line: 84 Composite(Widget).sendEvent(Event) line: 1053 Composite(Widget).sendEvent(int, Event, boolean) line: 1077 Composite(Widget).sendEvent(int) line: 1058 Composite(Control).WM_SIZE(int, int) line: 5173 Composite(Scrollable).WM_SIZE(int, int) line: 291 Composite.WM_SIZE(int, int) line: 1662 Composite(Control).windowProc(int, int, int, int) line: 4603 Display.windowProc(int, int, int, int) line: 4972 OS.DefWindowProcW(int, int, int, int) line: not available [native method] OS.DefWindowProc(int, int, int, int) line: 2525 Composite(Scrollable).callWindowProc(int, int, int, int) line: 80 Composite(Control).WM_WINDOWPOSCHANGED(int, int) line: 5408 Composite(Control).windowProc(int, int, int, int) line: 4616 Display.windowProc(int, int, int, int) line: 4972 OS.SetWindowPos(int, int, int, int, int, int, int) line: not available [native method] Composite(Widget).SetWindowPos(int, int, int, int, int, int, int) line: 1457 Composite(Control).setBounds(int, int, int, int, int, boolean) line: 3124 Composite.setBounds(int, int, int, int, int, boolean) line: 1019 Composite(Control).setBounds(int, int, int, int, int) line: 3085 Composite(Control).setBounds(int, int, int, int) line: 3081 FillLayout.layout(Composite, boolean) line: 201 Composite.updateLayout(boolean, boolean) line: 1263 Composite.WM_SIZE(int, int) line: 1673 Composite(Control).windowProc(int, int, int, int) line: 4603 Display.windowProc(int, int, int, int) line: 4972 OS.DefWindowProcW(int, int, int, int) line: not available [native method] OS.DefWindowProc(int, int, int, int) line: 2525 Composite(Scrollable).callWindowProc(int, int, int, int) line: 80 Composite(Control).WM_WINDOWPOSCHANGED(int, int) line: 5408 Composite(Control).windowProc(int, int, int, int) line: 4616 Display.windowProc(int, int, int, int) line: 4972 OS.SetWindowPos(int, int, int, int, int, int, int) line: not available [native method] Composite(Widget).SetWindowPos(int, int, int, int, int, int, int) line: 1457 Composite(Control).setBounds(int, int, int, int, int, boolean) line: 3124 Composite.setBounds(int, int, int, int, int, boolean) line: 1019 Composite(Control).setBounds(int, int, int, int, int) line: 3085 Composite(Control).setBounds(int, int, int, int) line: 3081 Composite(Control).setBounds(Rectangle) line: 3148 ViewPane(LayoutPart).setBounds(Rectangle) line: 300 PresentablePart.setBounds(Rectangle) line: 170 PresentablePartFolder.layoutContent() line: 131 PresentablePartFolder.access$0(PresentablePartFolder) line: 127 PresentablePartFolder$1.controlMoved(ControlEvent) line: 56 TypedListener.handleEvent(Event) line: 223 EventTable.sendEvent(Event) line: 84 Composite(Widget).sendEvent(Event) line: 1053 Composite(Widget).sendEvent(int, Event, boolean) line: 1077 Composite(Widget).sendEvent(int) line: 1058 Composite(Control).WM_MOVE(int, int) line: 5056 Composite(Control).windowProc(int, int, int, int) line: 4578 Display.windowProc(int, int, int, int) line: 4972 OS.DefWindowProcW(int, int, int, int) line: not available [native method] OS.DefWindowProc(int, int, int, int) line: 2525 Composite(Scrollable).callWindowProc(int, int, int, int) line: 80 Composite(Control).WM_WINDOWPOSCHANGED(int, int) line: 5408 Composite(Control).windowProc(int, int, int, int) line: 4616 Display.windowProc(int, int, int, int) line: 4985 OS.EndDeferWindowPos(int) line: not available [native method] ViewForm(Composite).resizeChildren(boolean, WINDOWPOS[]) line: 949 ViewForm(Composite).resizeChildren() line: 915 ViewForm(Composite).setResizeChildren(boolean) line: 1126 ViewForm(Composite).updateLayout(boolean, boolean) line: 1264 ViewForm(Composite).updateLayout(boolean) line: 1249 ViewForm(Composite).setLayoutDeferred(boolean) line: 1086 PaneFolder.layout(boolean) line: 556 DefaultTabFolder.layout(boolean) line: 403 PresentablePartFolder.layout(boolean) line: 408 PresentablePartFolder.select(IPresentablePart) line: 292 LeftToRightTabOrder.select(IPresentablePart) line: 65 TabbedStackPresentation.selectPart(IPresentablePart) line: 473 ViewStack(PartStack).refreshPresentationSelection() line: 1245 ViewStack(PartStack).createControl(Composite, StackPresentation) line: 662 ViewStack(PartStack).createControl(Composite) line: 570 ViewSashContainer(PartSashContainer).createControl(Composite) line: 568 PerspectiveHelper.activate(Composite) line: 272 Perspective.onActivate() line: 981 WorkbenchPage.setPerspective(Perspective) line: 3713 WorkbenchPage.busySetPerspective(IPerspectiveDescriptor) line: 1115 WorkbenchPage.access$16(WorkbenchPage, IPerspectiveDescriptor) line: 1099 WorkbenchPage$19.run() line: 3814 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchPage.setPerspective(IPerspectiveDescriptor) line: 3812 PerspectiveBarContributionItem.select() line: 124 PerspectiveBarContributionItem$1.widgetSelected(SelectionEvent) line: 93 TypedListener.handleEvent(Event) line: 240 EventTable.sendEvent(Event) line: 84 ToolItem(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4165 Display.readAndDispatch() line: 3754 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2696 Workbench.runUI() line: 2660 Workbench.access$4(Workbench) line: 2494 Workbench$7.run() line: 674 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 667 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 344 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386
Something similar has been reported in the past (bug 329049). I'll try to take a look at it soon, since I guess someone out there is using the debug breadcrumb besides me ;-)
Problem addressed by the same fix. *** This bug has been marked as a duplicate of bug 370560 ***