Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317100

Summary: Debug breadcrumb does not allow to switch threads
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, darin.eclipse, deepakazad, Michael_Rennie, pawel.1.piech
Version: 3.6Flags: darin.eclipse: review+
Target Milestone: 3.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch with fix and test. none

Description Markus Keller CLA 2010-06-16 14:33:19 EDT
I20100608-0911, follow-up to bug 277862 comment 6

The Debug view in breadcrumb mode does not allow to switch threads. When I open the breadcrumb drop-down on the thread and then click either another thread or a stack frame of another thread, nothing happens. The clicked item should be selected in the breadcrumb.

Test case:

public class C {
	public static void main(String[] args) throws InterruptedException {
		int i= 2;
		System.out.println(i);
		
		Thread t2 = new Thread("T2") {
			public void run() {
				doit(getName());
			};
		};
		t2.start();
		
		Thread t3 = new Thread("T3") {
			public void run() {
				doit(getName());
			};
		};
		t3.start();
		
		t2.join();
		t3.join();
	}

	protected static void doit(String name) {
		now(name);
	}

	protected static void now(String name) {
		System.out.println(name); // Breakpoint
	}
}
Comment 1 Darin Wright CLA 2010-06-17 09:33:09 EDT
Pawel, could you take a look at this one. It might be a 3.6.1 candidate.
Comment 2 Pawel Piech CLA 2010-06-17 10:13:14 EDT
(In reply to comment #1)
> Pawel, could you take a look at this one. It might be a 3.6.1 candidate.

I saw the post yesterday but I was busy with other work.  I'll make sure to get to it by end of the week.
Comment 3 Pawel Piech CLA 2010-06-18 15:30:31 EDT
Created attachment 172248 [details]
Patch with fix and test.

This looks like a casualty of fix for 304277.  The strange thing is that I use the breadcrumb DV when doing PDE debugging all the time, and PDE doesn't have this problem.

This patch adds a unit test for the selection policy and a fix.
Comment 4 Pawel Piech CLA 2010-06-18 15:49:38 EDT
I committed the fix.  I'd like to merge it to 3.6.x also, though I'm not sure if I'll get to it today.
Comment 5 Darin Wright CLA 2010-06-18 16:02:25 EDT
Verified the 3.7 fix. Re-openning to target for 3.6.1
Comment 6 Darin Wright CLA 2010-06-24 12:47:25 EDT
Applied the same patch to the 3.6 maintenance branch. Released for the next build.