brunoborges/jdb-agentic-debugger/jdb-debugger
Claude Code and agent skill by brunoborges/jdb-agentic-debugger
- community
Checking that the SKILL.md file is still in the repository.
Debug Java applications in real time using JDB (Java Debugger CLI). Attach to running JVMs or launch new ones under JDB, set breakpoints, step through code, inspect variables, analyze threads, and diagnose exceptions. Use when debugging Java programs, investigating runtime behavior, or diagnosing production issues on JVMs with JDWP enabled.
Install
npx vskill@latest install brunoborges/jdb-agentic-debugger/jdb-debuggerSKILL.md
Java Debugger (JDB) Skill
Debug Java applications interactively using the JDK's built-in command-line debugger.
Critical Rules for Agents
- NEVER create debugger helper files in the workspace (no
bp.txt,cmds.txt,
wrapper scripts, etc.). Requested report artifacts such as findings-*.md and DEBUG-REPORT.md are allowed. Use the inline CLI flags (--bp, --cmd, --auto-inspect, --timeout) provided by the skill scripts.
- ALWAYS use the skill scripts in
scripts/. Never write
custom JDB wrapper scripts, FIFO-based launchers, or shell scripts to drive JDB.
- Compile first, then debug. Ensure classes are compiled before launching JDB.
- On Windows, invoke scripts via WSL:
wsl bash scripts/<script>.sh
Platform Support
Windows (WSL Required)
The scripts in this skill are Bash scripts. On Windows, invoke them via WSL:
If your compiled classes are on the Windows filesystem, WSL accesses them via /mnt/c/:
Ensure JDK is installed in WSL:
Linux / macOS
Scripts run natively. Ensure JDK is installed and jdb is on PATH:
Decision Tree
Quick Start
Option 1: Launch a new JVM under JDB
Option 2: Attach to a running JVM
First, ensure the target JVM was started with the JDWP agent:
Then attach:
Option 3: Quick diagnostics (thread dump + deadlock detection)
Enabling JDWP on a Running Application
If the target JVM was not started with JDWP, suggest the user restart with:
Interactive JDB Session Guide
Once inside a JDB session (launched or attached), use these commands interactively:
Setting Breakpoints
For overloaded methods, specify parameter types:
Running and Stepping
Inspecting State
Navigating the Call Stack
Thread Management
Exception Handling
Inspecting Classes and Methods
Managing Breakpoints
Source Code
Exiting
Debugging Workflow Patterns
Pattern 1: Investigate a NullPointerException (automated batch mode)
Use inline --bp flags and --auto-inspect — no files needed:
The --auto-inspect 20 flag automatically generates run + 20 cycles of where, locals, cont + quit. The output contains the full JDB session including stack traces, local variables, and exception details — ready for analysis.
For applications that may hang or deadlock, add --timeout <seconds> to kill the JDB session after the specified time:
For custom commands, use --cmd flags instead of --auto-inspect:
Pattern 2: Watch a method's behavior
Pattern 3: Diagnose a deadlock
Pattern 4: Inspect values at a specific line
Important Notes
- NEVER create debugger helper files in the workspace. Requested report
artifacts are allowed. Use inline --bp, --cmd, --auto-inspect, and --timeout flags. The scripts handle temporary input internally and clean up.
- Use `--timeout` for potentially hanging apps. Apps that deadlock or loop indefinitely
will block JDB forever. Add --timeout 60 (or appropriate value) so the session is automatically killed. The output will include a TIMEOUT: marker when triggered.
- Compile with `-g` for full debug info. Without it,
localswill show
"Local variable information not available". Always compile with: javac -g -d out src/main/java/com/example/MyClass.java
- JDB is line-oriented: Send one command at a time and read the output before the next command.
- Source path: Use
-sourcepathorusecommand solistcan show source code. - Classpath: Ensure compiled classes are accessible for expression evaluation.
- Thread context: Many commands operate on the "current thread". Use
threadto switch. - Suspend mode: When attaching with
suspend=y, the JVM pauses until JDB connects. Usesuspend=nfor non-blocking attachment. - Expression evaluation:
printandevalcan call methods on live objects — use with caution in production. - Remote/production safety: obtain authorization before attaching, prefer a
loopback or tunneled JDWP endpoint, avoid broad exception catchpoints on busy services, and treat evaluated methods as potentially state-changing.
- Batch timing: The batch mode uses configurable delays. Override via env vars:
JDB_BP_DELAY (default: 2s), JDB_RUN_DELAY (3s), JDB_CMD_DELAY (0.5s), JDB_CONT_DELAY (1s).
Reference Files
- JDB Command Reference - Complete alphabetical command reference
- JDWP Options Reference - All JDWP agent configuration options
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNeutral, 78 of 100Ineffective. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/jdb-debugger/SKILL.md
Popularity
- Repository stars
- 37
- Repository forks
- 2
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/brunoborges/jdb-agentic-debugger/jdb-debugger)