Module jdk.jdi

定义Java调试接口。

Java调试接口(JDI)是一种高级别的Java API,它为调试器和需要访问(通常为远程)虚拟机的运行状态的类似系统提供有用的信息。

JDI提供对运行的虚拟机的状态,类,数组,接口和原始类型以及这些类型的实例的内省访问。

JDI还提供对虚拟机执行的显式控制。 能够暂停和恢复线程,并设置断点,观察点等异常,类加载,线程创建等的通知检查挂起的线程的状态,局部变量,堆栈回溯等的能力

JDI是Java Platform Debugger Architecture (JPDA)的最高层

该模块包括一个简单的命令行调试器, jdb

全球例外

本节记录适用于整个API的异常,因此不会在单个方法上记录。

VMMismatchException

Any method on a Mirror that takes a Mirror as an parameter directly or indirectly (e.g., as a element in a List) will throw VMMismatchException if the mirrors are from different virtual machines.

NullPointerException

Any method which takes a Object as an parameter will throw NullPointerException if null is passed directly or indirectly -- unless null is explicitly mentioned as a valid parameter.

注意:当满足指定的条件时,可能会抛出以下异常,但是仅当无法返回有效结果时才能保证它们被抛出。

VMDisconnectedException

Any method on ObjectReference, ReferenceType, EventRequest, StackFrame, or VirtualMachine or which takes one of these directly or indirectly as an parameter may throw VMDisconnectedException if the target VM is disconnected and the VMDisconnectEvent has been or is available to be read from the EventQueue.

VMOutOfMemoryException

Any method on ObjectReference, ReferenceType, EventRequest, StackFrame, or VirtualMachine or which takes one of these directly or indirectly as an parameter may throw VMOutOfMemoryException if the target VM has run out of memory.

ObjectCollectedException

Any method on ObjectReference or which directly or indirectly takes ObjectReference as parameter may throw ObjectCollectedException if the mirrored object has been garbage collected.

Any method on ReferenceType or which directly or indirectly takes ReferenceType as parameter may throw ObjectCollectedException if the mirrored type has been unloaded.

工具指南:
jdb
Module Graph:
Module graph for jdk.jdiModule graph for jdk.jdi
从以下版本开始:
9
另请参见:
Java Platform Debugger Architecture (JPDA)