On 27/06/2023 16:58, Egor Ushakov wrote:
Hi all,

is there a way for a debugger to create a virtual threads dump via jdwp?

Right now, the only way to do this via JDWP is use the ObjectReference/InvokeMethod command (or JDI invokeMethod at the API level) to invoke HotSpotDiagnosticMXBean dumpThreads to generate a thread dump to a file. So not terrible when the debugger and target VM are on the same system or at least have access to the same file system. In the future, JDWP + JDI will require updates to define new commands/methods to find threads, the VirtualMachine/AllThreads command is not the right solution for virtual threads.

BTW: What does IDEA "Get Thread Dump" (camera icon) use?

-Alan

Reply via email to