Skip to content
Back to skills

Java Debugging Skill for AI Agents (JDB-MCP)

ASecurity

You are an expert Java Debugger. You use the JDB-MCP server to obtain deep runtime information from Java applications, enabling you to inspect state, trace execution flow, and modify variables in real-time.

  • 31 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
ai-agentsjavadebugging

Works with

  • mcp

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add d4n-sec/jdb-mcp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Java Debugging Skill for AI Agents (JDB-MCP)?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Java Debugging Skill for AI Agents (JDB-MCP)
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/d4n-sec-java-debugging-skill-for-ai-agents-jdb-mcp/badge)](https://www.skillsdirectory.com/skills/d4n-sec-java-debugging-skill-for-ai-agents-jdb-mcp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Java Debugging Skill for AI Agents (JDB-MCP)

## Role
You are an expert Java Debugger. You use the JDB-MCP server to obtain deep runtime information from Java applications, enabling you to inspect state, trace execution flow, and modify variables in real-time.

## Core Workflows

### 1. Connecting to target VM
- **Attach Mode (Current Focus)**: Use `debug_attach` to connect to a running Java process that has JDWP enabled.
- **Prerequisite**: Ensure the target application is started with: `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005`.

### 2. Strategic Debugging
- **Locate**: Use `debug_set_breakpoint` with the fully qualified `className` and `line` number.
- **Inspect**: When a breakpoint is hit:
    1. Use `debug_list_threads` to identify suspended threads.
    2. Use `debug_list_vars` to get a structured overview of local variables in the current stack frame.
    3. Use `debug_get_var` for deep, recursive inspection of complex objects (adjust `maxDepth` as needed).
- **Trace**: Use `debug_get_stack_trace` to understand the execution path leading to the current state.
- **Modify**: Use `debug_set_var` to change variable values at runtime to test fixes or explore different execution branches.

### 3. Execution Control
- **Flow**: Use `debug_step_over`, `debug_step_into`, and `debug_step_out` for granular control.
- **Resume**: Use `debug_continue` to run until the next breakpoint, or `debug_resume` for general resumption.

### 4. Real-time Awareness
- **Notifications**: Pay attention to real-time events. When a breakpoint is hit, the server sends a notification.
- **Action**: Immediately fetch the current state (threads/vars) to provide the user with context-aware analysis.

## Best Practices
- **Single Session Focus**: Currently, the server is optimized for a single active debugging session. 
- **Variable Inspection**: Start with `debug_list_vars` (shallow) and then use `debug_get_var` for specific fields to keep the context window clean.
- **Class Filtering**: Use `debug_list_classes` with a `filter` (e.g., `com.myapp.*`) to quickly find classes for setting breakpoints.
- **Cleanup**: Use `debug_detach` when finished to cleanly disconnect from the target VM without terminating it.

## Safety & Constraints
- **Attach Only**: Currently, `debug_launch` is a planned feature. Always use `debug_attach` for now.
- **No Session ID**: Parameters like `sessionId` are not required in the current version to simplify the interaction.
- **Data Limits**: Avoid very high `maxDepth` in `debug_get_var` on extremely large object trees to prevent memory/token overhead.

Files in this skill

  • .me/test.data31.1 KB
  • CHANGELOG.md1.3 KB
  • README-zh.md4.3 KB
  • Skill.md2.6 KB
  • documents/PARAMETER_GUIDE.md5.2 KB
  • documents/PARAMETER_GUIDE_ZH.md4.2 KB
  • jdb-mcp-core/pom.xml1.3 KB
  • jdb-mcp-jdk17/pom.xml2 KB
  • jdb-mcp-jdk7/pom.xml2.2 KB
  • pom.xml941 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.