Is it possible to use other thread than DebuggerManagerThreadImpl to invoke JDI methods like invokeMethod?
Answered
Currently if I try to call JDI's invokeMethod in a thread which is not the DebuggerManagerThreadImpl, I get com.sun.jdi.IncompatibleThreadStateException. Is there any way to overcome this issue? I'd like to speed up things by calling invokeMethod on some objects in different threads.
Please sign in to leave a comment.
Is this same question as https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009481119-How-to-abort-long-running-DebuggerCommand-?
Hey, not quite, this is for speeding up calling many invokeMethods in parallel, and the other question is about aborting the invokeMethods if they take too long time. Related but totally different use cases.
Hi, if all threads are suspended then this should be possible, see the javadoc for the invokeMethod:
IncompatibleThreadStateException – if the specified thread has not been suspended by an event.
OK. Thank you very much!