When is it safe to call invokeMethod?

Working from the Trace.java example in the JPDA demo, I tried to insert some invokeMethod calls in one of the event handlers, to get supplementary information about the source of the event, but this always leads the tracer VM to hang in mid-air (i.e., the printout can be interrupted in the middle of a string) after a while, even though no exceptions are thrown.

The documentation for JDI is just awful: nowhere could I find anything amounting to a decent tutorial. Does anybody know when it is safe to make calls to the VM being traced and why I am seeing this behaviour?

[587 byte] By [xolotla] at [2007-10-2 10:24:41]
# 1
I have to say that the lack of response on this forum and the scant documentation that come with the API reflect very poorly on JPDA.
xolotla at 2007-7-13 1:59:13 > top of Java-index,Archived Forums,Debugging Tools and Techniques...