Our language plugin, not generating class files on disk, needs to notify the debugged process of class changes. Our type system dynamically compiles to bytecode in memory. So what I'd like to do is notify the target process's type system via JDI ClassType.invokeMethod(). The general idea is our type system would detect the jdwp agent and if present create a dedicated thread to receive the call. However, it appears that JDI does not accommodate this scenario; it seems that invokeMethod() can be called only when the thread is suspended during a breakpoint, which is not always the case when compiling in the debugger and it certainly isn't the case for the dedicated thread. So my question is, is there some way to use JDI from IntelliJ to notify the target process? I'd really like to piggyback on the existing JDI socket and not have to create a separate line of communication.
Please sign in to leave a comment.