Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 295776 - [debug view][breakpoints] Hitting a breakpoint should cause Debug view to select the stack frame in which the breakpoint was hit
Summary: [debug view][breakpoints] Hitting a breakpoint should cause Debug view to sel...
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 21:02 EST by Mike Morearty CLA
Modified: 2011-06-07 18:38 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Morearty CLA 2009-11-20 21:02:15 EST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
Build Identifier: 20090920-1017

When you hit a breakpoint, the Debug view changes its focus, but not always to the callstack that was actually hit.  If another suspended callstack exists farther up in the view, then that is the one that will get focus.

Reproducible: Always

Steps to Reproduce:
1. Make two Java projects "j1" and "j2".  
2. Make a class "j1" in the first project, "j2" in the second.
3. Give each one a main() function that has a System.out.println("hi") line.
4. Set breakpoints on both System.out.println() lines.
5. Open j1.java, and click Debug.  You will hit the breakpoint in j1.main(), and the Debug view will change its selection so that j1.main() is selected.
6. Open j2.java, and click Debug.

Actual result:
The contents of the Debug view update correctly so that it now shows both j1 and j2; however, j1.main() is still the current selection in that view.

Expected result:
Since the most recent debug event to occur was hitting a breakpoint in j2.main(), I would expect the Debug view to set its selection to j2.main().
Comment 1 Darin Wright CLA 2009-11-22 11:55:59 EST
This is the designed/intended behavior. Basically, if the user if focused on a suspended thread, we don't want to take focus away from it automatically - they might be doing something important. Each thread that suspends is queued as the "next important focus point", so when the user resumes the first thread, selection will move to the next suspended thread.
Comment 2 Jay Goldman CLA 2010-01-20 09:55:27 EST
If thread groups are enabled and the breakpoint is in a thread that is in a 'collapsed' group then you can wind up with no stack frame having focus and you have to go opening each group to find the thread.
Comment 3 Pawel Piech CLA 2011-06-07 18:38:57 EDT
Working as expected.  Please open a separate bug for JDT for the threads-group use case if needed.