Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Problems with Breakpoints and Launching Java Programs Programmatically
Problems with Breakpoints and Launching Java Programs Programmatically [message #156694] Thu, 29 April 2004 18:02
Sami Lakka is currently offline Sami LakkaFriend
Messages: 47
Registered: July 2009
Member
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
Previous Topic:Local Variables not visible!
Next Topic:comment block style
Goto Forum:
  


Current Time: Wed Jun 26 19:26:05 GMT 2024

Powered by FUDForum. Page generated in 0.02474 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top