I am developing a plugin for eclipse to make custom debug actions . My use case is, I will open debugger and set breakpoints, but when i access my ui ,the debugger should not stop at my breakpoints, instead it should store the value of the variable in that breakpoint to a file and keep resuming. (I will run a selenium test case and for each request i need the values in each breakpoint to be stored in a file for testing)..
As far as I understood I have added a breakpointListener which extends IJavaBreakPointListener and overriden the breakpointHit() method
@Override
public int breakpointHit(IJavaThread thread, IJavaBreakpoint breakpoint) {
// TODO Auto-generated method stub
System.out.println("Breakpoint has been hit!!!!!!!!!!!!!!");
/**
I need the value of the variable at this breakpoint
**/
return 0;
}
and I have to add this listener to JDIDebugModel...
using
JDIDebugModel.addJavaBreakpointListener(listener);
But i dont know in which class I should put the addJavaBreakpointListener call.. This listener is never called ..
please help I'm stuck with this. Or do suggest alternate solutions for my use case
