Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 10595 - Debug into non-JavaBuildPath no longer works.
Summary: Debug into non-JavaBuildPath no longer works.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 11055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-01 12:35 EST by Richard Kulp CLA
Modified: 2002-03-18 10:59 EST (History)
1 user (show)

See Also:


Attachments
Here is the project. I just found out you can attach files too, so instead of importing from the comments, use this project (5.08 KB, application/octet-stream)
2002-03-01 12:39 EST, Richard Kulp CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Kulp CLA 2002-03-01 12:35:33 EST
I just upgraded to 20020214 driver and the DebuggerSourceLookupPath is
no longer respected. It will only find things in the Java Build Path. If
source for something can't be found, a dialog pops up to ask where is
the source, but no matter what you set in there, it is ignored and the
source can't be found. In my case I dynamically load some classes that
are not in the build path (I do it through a classloader classpath) and
I know where the source is, but it won't let me get to it.

Here's a simple testcase:

1) Create a java project with src/bin directories.
2) Create a package test.staticguy.
3) In this package place this class:

package test.staticguy;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;

/**
 * 1) Export the dynamicFolder to the "C" drive.
 * 2) Execute and try to step into the invoke method.
 *    It will ask you where is the source, point to
 *    the "c:/dynamicFolder/src" directory. In 0125
 *    driver this works, in the 0214 driver it does not.
 */
public class MainGuy {

	public static void main(String[] args) {
		try {
			URL dynamicBinPath = new URL
("file:/c:/dynamicFolder/bin/");

			URLClassLoader cl = new URLClassLoader(new URL[] { 
dynamicBinPath });
			Class testGuyClass = cl.loadClass
("test1.dynamic.TestDynamic");

			Object testGuy = testGuyClass.newInstance();
			Method method1 = testGuyClass.getMethod("Method1", 
null);
			method1.invoke(testGuy, null);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
}

4) Separately compile (not in the above project) the following class:

package test1.dynamic;
/**
 * @version 	1.0
 * @author
 */
public class TestDynamic {
	
	public void Method1() {
		System.out.println("This is method1");
	}

}

5) Create a directory c:/dynamicFolder/bin and c:/dynamicFolder/src
6) Put the TestDynamic.java into the c:/dynamicFolder/src/test1/dynamic 
directory
7) Put the TestDynamic.class into the c:/dynamicFolder/bin/test1/dynamic 
directory

8) Finally try debugging MainGuy and step into the invoke method. It will 
prompt for src location. In 0125 driver this works in 0214 it does not.

Thank you,
Rich Kulp
Comment 1 Richard Kulp CLA 2002-03-01 12:39:55 EST
Created attachment 414 [details]
Here is the project. I just found out you can attach files too, so instead of importing from the comments, use this project
Comment 2 Darin Swanson CLA 2002-03-04 12:29:03 EST
Currently it is broken.
This is being reworked as part of the launch configuration work.
Comment 3 Darin Wright CLA 2002-03-08 15:51:11 EST
*** Bug 11055 has been marked as a duplicate of this bug. ***
Comment 4 Darin Wright CLA 2002-03-13 15:40:20 EST
Fixed
Comment 5 Darin Wright CLA 2002-03-13 15:40:36 EST
Please verify (Darin S).
Comment 6 Richard Kulp CLA 2002-03-13 15:50:56 EST
Can you tell me which driver this will be in so that I can verify it when I get 
that driver? Thanks, Rich Kulp
Comment 7 Darin Swanson CLA 2002-03-18 10:59:45 EST
Verified.

Will be available in the next integration build (which I believe is occurring 
today (March 18, 2002)).