Bug 540461 - Bug in debug perspective (variables not seen)
Summary: Bug in debug perspective (variables not seen)
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-25 06:34 EDT by Radek Pol CLA
Modified: 2023-03-11 17:30 EST (History)
3 users (show)

See Also:


Attachments
eclipse_debug_bug (72.01 KB, image/png)
2018-10-25 06:34 EDT, Radek Pol CLA
no flags Details
bug2 (52.82 KB, image/png)
2018-10-25 08:33 EDT, Radek Pol CLA
no flags Details
launching settings (30.56 KB, image/png)
2018-12-25 06:40 EST, Radek Pol CLA
no flags Details
perspectives settings (39.12 KB, image/png)
2018-12-25 06:40 EST, Radek Pol CLA
no flags Details
screen recording (1.35 MB, video/mp4)
2018-12-25 06:41 EST, Radek Pol CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Pol CLA 2018-10-25 06:34:25 EDT
Created attachment 276373 [details]
eclipse_debug_bug

Every time I debug my program first time after I run Eclipse, when it stops at breakpoint, I can see nothing in "Variables" view. Variables and values appear atfer step over to the next line. This bug only occurs after first switch to debug perspective.

Eclipse version:
Version: 2018-09 (4.9.0)
Build id: 20180917-1800

but I noticed this bug in all previous versions I used
Comment 1 Sarika Sinha CLA 2018-10-25 08:10:27 EDT
Can you check if in Debug view, the the thread is selected. After selecting the thread I can see the variables view populated.
Comment 2 Radek Pol CLA 2018-10-25 08:32:44 EDT
It is selected, but it looks like the "selection event" didn't fire, because when I click again on the thread, variables appear (see attachement). Thanks, it may help me - I don't have to step over or re-debug. But anyway - it should be better, when variables are seen as they should.
Comment 3 Radek Pol CLA 2018-10-25 08:33:20 EDT
Created attachment 276374 [details]
bug2
Comment 4 Andrey Loskutov CLA 2018-10-25 10:42:04 EDT
Radek, please provide step by step reproduction instructions and please check if this is may be fixed in the 4.10 latest nightly builds.
Comment 5 Sarika Sinha CLA 2018-10-25 11:47:34 EDT
@Andrey, In the latest build I see that thread is not selected on it's own when we have a switch to debug perspective.
Comment 6 Andrey Loskutov CLA 2018-10-25 11:50:53 EDT
(In reply to Sarika Sinha from comment #5)
> @Andrey, In the latest build I see that thread is not selected on it's own
> when we have a switch to debug perspective.

Interesting, can be related to bug 538548 changes we made, but I wonder that Radek mentioned it was broken in all previous releases too.

Simeon, what is the state of the patch for bug 540253?, now we've fixed Platform UI issue with phantom view?
Comment 7 Simeon Andreev CLA 2018-10-25 12:46:21 EDT
Sounds exactly like what we observed in our product, though in our case we needed to switch to debug perspective and back to see the problem.

https://git.eclipse.org/r/#/c/131127/ for bug 540253 is in my opinion ready to merge, possibly with the exception with the plug-in versions. I'll check those tomorrow.

At the very least we need to merge:

https://git.eclipse.org/r/#/c/131127/3/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java

This will revert the regression that is highly likely observed here. I'll check the reproduction steps with the changes from this review and without and I'll let you know (again tomorrow).

The rest of the changes in the review focus on trying to do something for bug 538548 after the fix for bug 538548 is reverted. The attempts are done only if specific JDT settings are used; those settings guarantee no perspective switch will occur on breakpoint hit and the debug view will not be activated.
Comment 8 Simeon Andreev CLA 2018-10-26 03:34:45 EDT
(In reply to Radek Pol from comment #2)
> It is selected, but it looks like the "selection event" didn't fire, because
> when I click again on the thread, variables appear (see attachement).
> Thanks, it may help me - I don't have to step over or re-debug. But anyway -
> it should be better, when variables are seen as they should.

I think this is a duplicate of bug 540253. I cannot reproduce this if I debug from Java perspective and switch to Debug perspective (when asked by the dialog). But once I switch back to Java perspective, debug and switch again, I can reproduce the problem.

With https://git.eclipse.org/r/#/c/131127/ I no longer see the problem.

Andrey, please check the review, in particular the plug-in version bumps. I don't see previous bumps for 4.10 but I do see recent commits in the plug-in which don't bump the version. So I'm confused.
Comment 9 Simeon Andreev CLA 2018-10-26 03:38:26 EDT
Then again, in https://bugs.eclipse.org/bugs/attachment.cgi?id=276374 there is a breakpoint hit green line visible in the editor. This should not available with bug 540253...

I'll check on Windows 10...
Comment 10 Radek Pol CLA 2018-10-26 03:47:52 EDT
Yes, I had this problem in previous versions too.
I have selected the option (checkbox in dialog popup) to switch perspective automatically, when stops on breakpoint.

Step-by-step to reproduce is simple:
- run eclipse
- toggle breakpoint
- do something to stop the program on this breakpoint (eclipse switches perspective)
- variables not seen in variables view

https://bugs.eclipse.org/bugs/show_bug.cgi?id=540253
looks similar to my problem.

When I re-enter debug mode next time, variables are visible.
Noticed on both Win 7 and Win 10.
Comment 11 Simeon Andreev CLA 2018-10-26 04:30:45 EDT
(In reply to Radek Pol from comment #10)
> Step-by-step to reproduce is simple:
> - run eclipse
> - toggle breakpoint
> - do something to stop the program on this breakpoint (eclipse switches
> perspective)
> - variables not seen in variables view
> 
> ...
> 
> When I re-enter debug mode next time, variables are visible.
> Noticed on both Win 7 and Win 10.

Can you try in a new workspace with a minimal snippet? Can you try with your current workspace with a minimal snippet?

I cannot reproduce this behaviour without switching back and forth between Java and Debug perspectives. I also cannot reproduce the screenshot which shows inactive Variables view but the Java editor shows a breakpoint hit.

Do you have non-default preferences and if so which? In particular under Window -> Preferences -> Run/Debug -> Launching / Perspectives.
Comment 12 Radek Pol CLA 2018-12-25 06:40:21 EST
Created attachment 276997 [details]
launching settings
Comment 13 Radek Pol CLA 2018-12-25 06:40:36 EST
Created attachment 276998 [details]
perspectives settings
Comment 14 Radek Pol CLA 2018-12-25 06:41:19 EST
Created attachment 276999 [details]
screen recording

I didn't change anything here, so settings should be as default.. I only checked the option "autoswitch perspective to debug when stoped on breakpoint". I attached screenshots of my settings.
I recorder my screen, how it looks like. Variables won't show up until I click mouse on thread (left side panel) or until I do "step over" when in debug mode.
Comment 15 Eclipse Genie CLA 2020-12-15 11:10:46 EST
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 16 Eclipse Genie CLA 2023-03-11 17:30:50 EST
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.