Problems with Breakpoints and Launching Java Programs Programmatically [message #156694] |
Thu, 29 April 2004 14:02 |
Eclipse User |
|
|
|
Hi,
I'm trying to create a breakpoint with JDIDebugModel to a file opened in
the Java view. The breakpoint gets added to the source but when I launch
the application the program doesn't halt in the breakpoint. I would want
to receive an breakpointHit in my IJavaBreakpointListener.
I'm launching the program with following code:
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type =
manager.getLaunchConfigurationType(IJavaLaunchConfigurationC onstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy wc =
type.newInstance(null,"SampleConfig");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJE CT_NAME, "Profiled
Program");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_ TYPE_NAME,
"Profileable");
ILaunchConfiguration config = wc.doSave(); ILaunch launch =
config.launch(ILaunchManager.DEBUG_MODE, null);
I'm adding the breakpoint with following code:
JDIDebugModel.addJavaBreakpointListener(this);
IJavaLineBreakpoint br = JDIDebugModel.createLineBreakpoint(resource,
typeName, line, -1, -1, 0,true, null);
Best regards,
- Sami
|
|
|
Powered by
FUDForum. Page generated in 0.03769 seconds