Bug 538627 - Keyboard shortcuts for debugging do not work when debugger was started from Java/Java EE perspective
Summary: Keyboard shortcuts for debugging do not work when debugger was started from J...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-05 04:11 EDT by Juergen Baier CLA
Modified: 2022-10-05 12:59 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Baier CLA 2018-09-05 04:11:54 EDT
Steps to reproduce:

1. Go to Java EE perspective (probably happens with Java perspective too)
2. Set breakpoint in Java code
3. Click on "Debug" (while still in Java EE perspective)

=> 

- switches to Debug perspective
- breakpoint is hit
- program execution pauses

but the keyboard shortcuts for e.g. "Step into" (F5) do not work. I have to click in the editor window to make them work again.

This happens on macO, but as far as I remember it also happened on Windows 7.
Comment 1 Andrey Loskutov CLA 2018-09-21 08:49:31 EDT
I believe we have observed something similar on Linux. Are the debug buttons also *disabled*?
Comment 2 Simeon Andreev CLA 2018-09-21 08:54:02 EDT
> - switches to Debug perspective

Automatic switch or clicking on the "switch perspective" dialog?
Comment 3 Juergen Baier CLA 2018-10-01 04:14:00 EDT
This happens when the perspective is automatically switched to the debug perspective (no click on "switch perspective").

The debug buttons are enabled and work fine.
Comment 4 Andrey Loskutov CLA 2018-10-01 04:22:56 EDT
(In reply to Juergen Baier from comment #3)
> This happens when the perspective is automatically switched to the debug
> perspective (no click on "switch perspective").
> 
> The debug buttons are enabled and work fine.

Interesting. Sounds like a missing "refresh" somewhere after perspective switch, to pick up the current editor context or something like that.

Juergen: can you enable tracing for "Platform e4 Workbench SWT" and "Platform e4 Workbench UI" (all except menus and renderer) and check: which context will be reported as active after perspective switch, what will be reported on "F5" and what happens *after* "clicking in the editor window" (which probably activates the editor context).
Comment 5 Juergen Baier CLA 2018-10-01 05:04:52 EDT
I enabled the tracing flags you mentioned and I got:

1) Click on "Debug as Java Application":

| main | 2018-10-01 11:00:10.696 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Activating org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:10.699 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Trying to activate already active part: org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:13.148 | org.eclipse.e4.ui.workbench.swt | /trace/eclipse.context | org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator | trace | 143 | DEACTIVATED : PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext <- PerspectiveImpl (org.eclipse.debug.ui.DebugPerspective) Context <- TrimmedWindowImpl (IDEWindow) Context <- WorkbenchContext <- OSGi context for bundle: org.eclipse.e4.ui.workbench |
| main | 2018-10-01 11:00:13.150 | org.eclipse.e4.ui.workbench.swt | /trace/eclipse.context | org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator | trace | 143 | ACTIVATED : PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext <- PerspectiveImpl (org.eclipse.debug.ui.DebugPerspective) Context <- TrimmedWindowImpl (IDEWindow) Context <- WorkbenchContext <- OSGi context for bundle: org.eclipse.e4.ui.workbench |
| main | 2018-10-01 11:00:13.152 | org.eclipse.e4.ui.workbench.swt | /trace/eclipse.context | org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator | trace | 143 | ACTIVATED : PerspectiveImpl (org.eclipse.debug.ui.DebugPerspective) Context <- TrimmedWindowImpl (IDEWindow) Context <- WorkbenchContext <- OSGi context for bundle: org.eclipse.e4.ui.workbench |
| main | 2018-10-01 11:00:13.153 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Activating org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:13.155 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Trying to activate already active part: org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |



2) Press F5/F6:

(no additional output)



3) After clicking in the window:

| main | 2018-10-01 11:00:21.795 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Activating org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:21.798 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Trying to activate already active part: org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:21.801 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Activating org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
| main | 2018-10-01 11:00:21.804 | org.eclipse.e4.ui.workbench | /trace/focus | org.eclipse.e4.ui.internal.workbench.Activator | trace | 158 | Trying to activate already active part: org.eclipse.e4.ui.compatibility.editor=org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@7ad0cf01 (tags: [Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], contributorURI: null) (widget: ContributedPartRenderer$1 {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer@5811f080, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: CompatibilityPart [partId=org.eclipse.e4.ui.compatibility.editor, properties=[], tags=[Editor, org.eclipse.jdt.ui.CompilationUnitEditor, removeOnHide, active], wrapped=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, legacyPart=class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor, beingDisposed=false, alreadyDisposed=false], context: PartImpl (org.eclipse.e4.ui.compatibility.editor)  org.eclipse.jdt.ui.CompilationUnitEditorContext, variables: [], label: Test538627.java, iconURI: platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.png, tooltip: null, dirty: false, closeable: true, description: null) |
Comment 6 Eclipse Genie CLA 2020-10-06 13:47:17 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Eclipse Genie CLA 2022-10-05 11:53:24 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Juergen Baier CLA 2022-10-05 12:59:51 EDT
The bug is still reproducible with 2022-09.