Microsoft SDK for Java

IJITAttachDebugger : IUnknown

The IJITAttachDebugger interface notifies the debugger when a Java process running under the Microsoft VM throws an unhandled Java exception.

To notify the debugger when an unhandled Java exception is thrown in a running Java process, follow these steps.

  1. Register the CLSID of the debugger’s COM class that implements the IJITAttachDebugger interface in the JITAttachDebugger string value of the HKEY_CURRENT_USER\Software\Microsoft\Java VM registry key.

  2. Enable the debugging mode of the Microsoft VM by creating the HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM\Debug registry key, or by setting the MSJAVA_ENABLE_DEBUGGING environment variable to a non-zero value.

Note the space between Java and VM in the previous registry keys.

The JITAttachDebugger registry string value is treated as a semicolon-delimited list of CLSIDs for debuggers that the Microsoft VM should create and attempt to attach to for Just-In-Time (JIT) debugging. The Microsoft VM will attempt to create an instance of each CLSID listed in the order that they appear in this string, and will call its IJITAttachDebugger::JITAttach method until one of them returns a successful HRESULT. Only one debugger is allowed to attach to a Java process at a time. If the JITAttachDebugger registry value does not exist, the Microsoft VM won't automatically try to attach to a debugger when an unhandled Java exception is thrown.

  // Methods
JITAttach

© 1999 Microsoft Corporation. All rights reserved. Terms of use.