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

Bug 14472

Summary: Got source lookup dialog for scrapbook when launching Eclipse target
Product: [Eclipse Project] JDT Reporter: Nick Edgar <n.a.edgar>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Nick Edgar CLA 2002-04-23 22:50:54 EDT
Build 20020418

- created a scrapbook page
- executed an expression in it which sent some output to the console
- this worked fine

- later, I launched my eclipse target under debug
- the Scrapbook thread came up suspended in ScrapbookMain1.eval
- the Debugger Source Lookup came up for 
type 'org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1'

I had never even tried debugging in the scrapbook.

There are two problems here:
1. Scrapbook thread gets suspended when launching another target.
2. It can't find the source when this happens.


In case it's relevant, this is what I had earlier executed in the scrapbook:
Properties props = System.getProperties();
for (Iterator i = props.keySet().iterator(); i.hasNext();) {
	String key = (String) i.next();
	Object val = props.get(key);
	System.out.println(key + ": " + val);
}
Comment 1 Nick Edgar CLA 2002-04-23 22:57:35 EDT
Tried resuming scrapbook thread.
It suspended immediately, and again prompted for the source.
Comment 2 Nick Edgar CLA 2002-04-23 23:01:33 EDT
Note the name of my scrapbook page is "Scrappy.jpage" and the name of my 
Eclipse target is "Target", so the scrapbook page appears first in the list of 
processes.
It looks to me like the scrapbook thread is usually suspended, and the Debug 
view tried to select the first frame in the view on open.
Comment 3 Darin Wright CLA 2002-04-24 00:03:41 EDT
The scrapbook is implemented by launching a VM in debug mode, and performing 
evaluations. The scrapbook thread is suspended at an invisible breakpoints in a 
point where evaluations can be performed (thus, resuming the thread causes it 
to suspend again).

We should not be prompting for source. Perhaps we should be hiding the 
scrapbook VM all together.

*** This bug has been marked as a duplicate of 12783 ***