Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] Common Questions about functionality in jdt.debug.core

> 
> I am pretty confident that it chooses the correct method. When invoking 
> the run action on my plugin from a run-time workbench, the breakpoints 
> show up in the Debug Perspective - Breakpoints View for the type I 
> create them in, the marker's also show up in the Ruler.

Just because the breakpoint appears in the breakpoints view and ruler does 
not mean its attributes - signature and method name are set properly. It 
appears in the ruler based on the line number.

> 
> Thanks for the tips. Perhaps I am not launching the code properly?
> 
> After I have used .create*Breakpoint I call a method to launch using the 

> code taken from help/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_run.htm

You should look at the paper on launching Java applications as well - i.e. 
using a launch config to launch the application.

        
http://www.eclipse.org/articles/Article-Java-launch/launching-java.html

> 
> ILaunch launch = new Launch(null, ILaunchManager.DEBUG_MODE, null);
> vmRunner.run(vmConfig, launch, null);

Did you register the launch with the ILaunchManager?

> 
> I've tried using launch.getDebugTarget(), casting it to a 
> IJavaDebugTarget then passing this to my 
> IJavaBreakpointListener.installingBreakpoint(..) method to install the 
> breakpoint, but I get Class cast exceptions.

You don't need to do this. If the breakpoint is registered with the 
breakpoint manager and the launch is registered with the launch manager, 
the target will be notified of the breakpoints via #breakpointAdded(..).

Darin


Back to the top