I have a breakpoint that has some logic attached to it that I want to skip if the method it was in was invoked from JDI.
i.e. in the client jvm
foo.barr();
should cause the code associated with the breakpoint to be run but
fooReference.invoke(thread,barrMethod,params,0);
in the debugger jvm should result in the logic being skipped and the code resumed.
I have two questions:
How does a jdi method invocation appear on the client JVM's java call stack?
If it's not possible to detect an invoke using the call stack is there another method that could be used?