jdbg

jdbg is a skill for Claude Code from PieceOfFall/jdbg. It costs 62 tokens per session (3,450 once invoked), scanned A, original, Apache-2.0.

A command-line guide for interactive Java debugging with jdbg, a wrapper around the JDK's jdb debugger with an optional structured runtime-data backend. A stateful background session keeps the same debugging session available across separate commands.

In plain words
What is it for?
Use it to launch or attach to Java programs, set breakpoints, step through execution, inspect values and exceptions, track field changes, and investigate threads, locks, or deadlocks.
Why use it?
It helps find facts that cannot be established reliably by reading code alone, such as a value at a specific line, the source of a null error, or what a blocked thread is waiting for.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Good fit Use it to launch or attach to Java programs, set breakpoints, step through execution, inspect values and exceptions, track field changes, and investigate threads, locks, or deadlocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pieceoffall/jdbg/cli
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.

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

Made for: Claude Code.

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/cli/github.svg)](https://agentmods.dev/skills/pieceoffall/jdbg/cli)
Your own site
<a href="https://agentmods.dev/skills/pieceoffall/jdbg/cli"><img src="https://agentmods.dev/badge/skills/pieceoffall/jdbg/cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jdbg

Your own site · 80×15
<a href="https://agentmods.dev/skills/pieceoffall/jdbg/cli"><img src="https://agentmods.dev/badge/skills/pieceoffall/jdbg/cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00062 $0.03450
Opus 5.5 $0.00025 $0.01380
Sonnet 5.5 $0.00012 $0.00690
Haiku 4.5 $0.00006 $0.00345

Measured 3mo ago against content hash 0a221b879601, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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/cli/SKILL.md · 401 lines

How it starts

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

jdbg CLI - interactive Java debugging for Pi

jdbg is a cross-platform CLI wrapper around the JDK's jdb, with an optional JDI sidecar backend for structured runtime data. It keeps a stateful background daemon alive, so a debug session survives across separate shell commands.

Pi has no official jdbg MCP setup. Use the jdbg CLI directly.

Core loop: run one jdbg command, read the result, then decide the next command. Do not batch debugger commands, add sleeps, or guess timing. jdbg waits for the jdb prompt internally; long-running commands return TIMEOUT without killing the session.

When To Use

Use jdbg when you need runtime truth:

  • the value of a variable, field, array element, collection, or expression at a line
  • why an exception or NullPointerException is thrown, with stack and locals at the throw site
  • how execution reaches code, by stepping line by line
  • what a blocked or deadlocked thread is waiting on
  • who reads or modifies a field, using watchpoints

Do not use it for plain compile errors or code that is simple enough to reason about statically.

Start A Session

Compile Java with debug info when possible:

javac -g Main.java

Launch a program under the debugger:

jdbg launch Main --classpath . --sourcepath src

Launch with application arguments after --:

jdbg launch com.example.Main --classpath target/classes --sourcepath src/main/java -- arg1 arg2

Launch through the JDI sidecar when you need structured JDI data:

jdbg launch Main --backend jdi --classpath . --sourcepath src

Attach to a running JVM with JDWP enabled:

jdbg attach --host localhost --port 5005 --sourcepath src/main/java

Use the JDI sidecar for structured attach debugging:

jdbg attach --backend jdi --host localhost --port 5005 --sourcepath src/main/java

If --sourcepath is omitted, jdbg uses the shell's current working directory as the source root and sends it to the daemon as an absolute path. Relative --sourcepath values are also absolutized before the daemon sees them, so source lookup is stable even when the daemon was started from another directory. On JDI sessions, source lookup also tries the target JVM's user.dir and Maven/Gradle module roots inferred from java.class.path (for example mall-portal/target/classes -> mall-portal/src/main/java).

Read the full file on GitHub · 401 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. 3mo ago First seen · 401 lines · 62 tokens per session scan A 0a221b879601

Subscribe to this mod's changes

jdbg is a skill published in the GitHub repository PieceOfFall/jdbg (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 62 tokens to every session and 3,450 once invoked, about $0.0002 per session on Opus 5.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

jdbg compared with skills from other repositories

jdbg next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jdbgPieceOfFall/jdbgSkill114mo agoApache-2.0A62Claude Code
java-debugFgForrest/mcp-jdwp-javaSkill365d agoMITA60Claude Code
nullawaychromium/chromiumSkill25ktodayBSD-3-ClauseA43Claude Code, Codex
wxjava-troubleshooterbinarywang/WxJavaSkill33kyesterdayApache-2.0A65Codex
performance-smell-detectiondecebals/claude-code-javaSkill7801mo agoMITA51Claude Code, Codex
neqsim-code-hygieneequinor/neqsimSkill177todayApache-2.0A120Claude Code, Codex
126-java-exception-handlingjabrena/plinthSkill469yesterdayApache-2.0A144Claude Code, Codex