Skip to main content

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

There is an existing enhancement request to provide the 'value to be' for 
watchpoints - once implemented, you will be able to retrieve the new 
value. Technically, you are not supposed to subclass internal classes. If 
you do so, it's at your own risk. It would be better to vote/wait for the 
enhancement request to be implemented, or even better, implement the fix 
and contribute a patch. 

see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=24334 for the 
existing enhancement request.

Darin




Ralf Anklam <ikeman@xxxxxxxxxxxxxxx> 
Sent by: jdt-debug-dev-bounces@xxxxxxxxxxx
08/11/2005 03:18 PM
Please respond to
"Eclipse JDT Debug developers list."


To
jdt-debug-dev@xxxxxxxxxxx
cc

Subject
[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
_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-debug-dev




Back to the top