Home

JDI

JDI stands for Java Debug Interface, a high-level API for building debugging tools for Java programs. It is part of the Java Platform Debugger Architecture (JPDA), alongside the low-level protocol JDWP (Java Debug Wire Protocol) and the native interface JVMTI. JDI provides a Java language API that debugger applications use to control and inspect a target VM without implementing protocol details.

The API enables connecting to a debuggee VM, configuring breakpoints, stepping through code, inspecting thread state

JDI uses an event-based model. Debuggers receive events such as BreakpointEvent, StepEvent, MethodEntryEvent, and ClassPrepareEvent, and

Major development environments, including Eclipse, IntelliJ IDEA, and NetBeans, implement JDI to provide their debugging features.

and
stack
frames,
and
examining
or
modifying
variables
and
fields.
It
supports
both
local
and
remote
debugging
through
connectors
such
as
LaunchingConnector
and
AttachingConnector
to
obtain
a
VirtualMachine
instance.
respond
by
issuing
further
requests
or
evaluating
expressions
in
the
context
of
stack
frames.
The
API
is
designed
to
be
platform-independent
and
hides
the
details
of
the
underlying
JDWP
protocol,
though
performance
and
capabilities
depend
on
the
target
VM
and
session
configuration.