
When an AI Agent Gets Its Hands on a Debugger
Agentic programming is fascinating, but it has one fundamental weakness — the agent can't see what's actually happening inside a running application. We built an MCP server that gives AI agents full access to the Java debugger via the JDWP protocol. In this article, we'll look at how it works, how you can try it yourself, and why it helps us in developing evitaDB.

As developers, we'd instinctively reach for the debugger in such a situation — set a breakpoint and within minutes see what's actually going on. No recompilations, no polluting the code with temporary print statements. Until now, agents didn't have that option.
Why We Built This
Previously, we had to manually analyze the output and then sit at the debugger ourselves. Today, an agent connected via MCP JDWP Inspector can perform the entire analysis autonomously — it finds the failure point, sets breakpoints, inspects variable state, and in the vast majority of cases identifies the root cause on its own. The time saved adds up to hours.
What the Agent Can Do
MCP JDWP Inspector provides 40 tools organized into logical groups:
- Breakpoints — standard line breakpoints, conditional breakpoints (suspend only when a Java condition is met), exception breakpoints (catch them right at the throw site), and deferred breakpoints that activate automatically when the given class is loaded
- Logpoints — evaluate an expression at a given line without suspending the thread, ideal for non-intrusive observation
- Inspection — browse threads, call stacks, local variables, and object fields with automatic filtering of noise from JVM internals and frameworks
- Expression evaluation — compile and execute arbitrary Java code directly in the context of the suspended application with full classpath access
- Runtime mutation — modify values of local variables and object fields, invaluable for hypothesis testing
- Watchers — persistent expressions attached to breakpoints that are automatically evaluated on every hit
Everything runs locally, with zero outbound HTTP requests. Source code is compiled directly from the repository — no downloaded binaries, full auditability.
Getting Started — Quick Setup
- Plugin marketplace — two commands in Claude Code and you're done, the JAR is compiled automatically from a local clone
- Manual registration — clone the repository, build with Maven, and register the MCP server in your agent's configuration
Test-Flight: Try It on Your Own Agent
Watching the agent systematically walk through the code, set breakpoints, and gradually work its way to the root cause is an experience in itself — one that will change your perspective on what agentic programming can do.
How We Use It in evitaDB
In evitaDB, we have an extensive suite of fuzz tests that combine random operations on the catalog — inserting entities, schema changes, concurrent queries — and verify that results are always consistent. When such a test fails, the bug is deterministic but may only manifest after hundreds of generations and takes a while to reach. At the same time, resolving it requires setting breakpoints with surgically precise conditions to capture the specific scenario, which is very difficult and time-consuming without a debugger.
MCP JDWP Inspector has dramatically sped up our analysis in these situations. The agent walks through the failing test on its own, sets breakpoints at suspicious locations, monitors data structure state, and in the vast majority of cases identifies the cause without our intervention. For more complex issues, it at least significantly narrows down the area where we need to look.
It's especially useful for concurrency bugs — race conditions and deadlocks — where human analysis from a stack trace is often like looking for a needle in a haystack. An agent with debugger access can systematically inspect the state of individual threads and reconstruct the sequence of events far more reliably.
Wrapping Up
If you work on a Java project and use AI agents, we wholeheartedly recommend giving the plugin a try — at least on those five sandbox puzzles. It's the fastest way to understand what a difference it makes when the agent can "see inside" a running application.
