Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-debug-dev] Modification Watchpoint

Hello,

programmatically I create a modification watchpoint on a field and if the field is modified, I get noticed. I want to readout and store the value of this field. To do this I implemented the IDebugEventSetListenerInterface and react on suspend events, which are initiated by my watchpoint (IJavaBreakpointListener.breakpointHit()). If I want to readout the value, I get the old value and not the value, which will be set.

The JDI offers a ModificationWatchpointEvent and the opportunity the readout the value (ModificationWatchpointEvent.valueToBe()) Unfortunately this is not an org.eclipse.debug.core.DebugEvent, so I can not react in the IDebugEventSetListener.handleDebugEvents().

To react on this Event I would build a subclass of org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint and overwrite the method handleEvent() to handle the ModificationWatchpointEvent. So I would be able to store the value of my field.

Is this procedure the right way? Or is there some smarter solution to get the value after modification?


Ralf Anklam


Back to the top