jdbg

jdbg is a skill for Claude Code, Codex from PieceOfFall/jdbg. It costs 105 tokens per session (6,993 once invoked), scanned A, original, Apache-2.0.

A guide for using jdbg, an interactive tool that controls Java's jdb debugger and keeps a debugging session alive between commands.

In plain words
What is it for?
Use it to launch or attach to a Java process, set breakpoints, run to a location, inspect locals and expressions, and investigate thread problems.
Why use it?
It reveals what a Java program is actually doing at runtime, including live values, thrown exceptions, and blocked or deadlocked threads.

Skill for Claude CodeCodex

Part of the java-agent-debugger plugin — 2 skills, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pieceoffall/jdbg/mcp
Any agent
npx skills add PieceOfFall/jdbg --skill mcp
Clone the repo
git clone --depth 1 https://github.com/PieceOfFall/jdbg

Made for: Claude Code, Codex.

Or install java-agent-debugger, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jdbg

README.md
[![agentmods](https://agentmods.dev/badge/skills/pieceoffall/jdbg/mcp.svg)](https://agentmods.dev/skills/pieceoffall/jdbg/mcp)
Your own site
<a href="https://agentmods.dev/skills/pieceoffall/jdbg/mcp"><img src="https://agentmods.dev/badge/skills/pieceoffall/jdbg/mcp.svg" alt="Measured on agentmods" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.06993
Opus 5 $0.00053 $0.03497
Sonnet 5 $0.00021 $0.01399
Haiku 4.5 $0.00011 $0.00699

Measured 5d ago against content hash 547b8431449a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

jdbg scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/jdbg/mcp/SKILL.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

jdbg — interactive Java debugging for agents

jdbg is an MCP server that drives the JDK's jdb debugger as a stateful background session, so you can debug a Java program across many separate tool calls. Each tool call (launch, break_at, run, locals, …) sends ONE command to the session and returns a structured result. A background daemon keeps the JVM and debugger state alive between calls — set a breakpoint in one call, run in the next, inspect in the next.

The tools appear as mcp__jdbg__<tool> (e.g. mcp__jdbg__break_at). Below they are named bare (break_at) for brevity. The first tool call auto-starts the background daemon — no setup step is needed.

Core loop: react to each result. Call one tool, read its structured output, then decide the next call. Do NOT batch commands or tune timing — jdbg waits for jdb to be ready (no sleeps), and a hung program returns a non-destructive Timeout, not a freeze.

When to use

  • Find the real runtime value of a variable / field / expression at a line (not by reading code).
  • Diagnose why an exception or NPE is thrown — the stack and locals at the throw site.
  • Inspect threads; find what a blocked or deadlocked thread is waiting on.
  • Step through execution line by line to see actual control flow.
  • Attach to an already-running JVM that has JDWP enabled.

When NOT: logic simple enough to read; a compile/build error (that is javac, not a debugger); no running JVM and nothing launchable.

Start a session — two ways

Launch a program under the debugger (you have the main class + classpath) — call launch with main_class (and usually classpath; pass program args via app_args):

launch { "main_class": "com.example.Main", "classpath": "out", "sourcepath": "src", "app_args": ["arg1", "arg2"] }

Returns a session id, state loaded (JVM not started yet). Set breakpoints, then call run.

Attach to a running JVM started with JDWP — call attach:

attach { "host": "localhost", "port": 5005, "sourcepath": "src" }

The default JDI backend returns state running for attach; set breakpoints, then call cont (attach has no run). If local JDI prerequisites are missing, an omitted backend automatically falls back to jdb and returns a note; explicit backend: "jdi" means JDI is required and does not fall back.

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 367 lines · 105 tokens per session scan A 547b8431449a

Subscribe to this mod's changes

jdbg is a skill published in the GitHub repository PieceOfFall/jdbg (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 105 tokens to every session and 6,993 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

java-debug

Debug a live Java application via the jdwp-inspector MCP server — breakpoints, runtime state, expression eval, variable mutation, exception-throw-site catches, non-intrusive line/exception logpoints, and field watchpoints (suspend or log on every read/write of a specific field).

FgForrest/mcp-jdwp-java · 60 tokens

release

Use when cutting a new release of the jdwp-debugging plugin — bumping the user-facing version, writing a CHANGELOG entry, committing, tagging, and pushing. Triggers — "do a release", "ship X.Y.Z", "release the last commits", "bump the version", "tag a release".

FgForrest/mcp-jdwp-java · 67 tokens

debug-live

Guides root-cause investigations with debugging capabilities by setting breakpoints, starting a debug session, stepping through execution, inspecting variables, and tracing symptoms back to their origin. Prefer it for runtime bugs, failing tests, exceptions, crashes, hangs, wrong/null values, and unexpected output…

microsoft/DebugMCP · 84 tokens

flask-werkzeug-attack

Exploit Flask/Werkzeug debugger exposure for traceback and SECRET leaks.

uphiago/recon-skills · 22 tokens

embedded-debugging

Debug embedded firmware on real hardware through the jlink-mcp server — crashes, hangs, peripheral misconfiguration, silent devices. Covers loading ELF symbols for source-level backtraces, supplying an SVD for named peripheral fields, and the halt/read/resume discipline. Use whenever debugging a microcontroller over a…

Klievan/jlink-mcp · 77 tokens

dbg

Debug applications using the dbg CLI debugger. Supports Node.js (V8/CDP), Bun (WebKit/JSC), Python (debugpy/DAP), Java (JDWP/DAP), and native code via LLDB (DAP). Use when: (1) investigating runtime bugs by stepping through code, (2) inspecting variable values at specific execution points, (3) setting breakpoints and…

theodo-group/debug-that · 206 tokens