Remote Java Debugging
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_b086e203/debug-java.
About this skill
Problem
Debugging a remote Java process often needs a lightweight entry point that stays close to the source tree. You must connect to a JDWP-enabled JVM, set breakpoints by class, line, or method, and inspect the hit context: local variables, object fields, and call stack. When the target class lacks -g:vars, method parameters may appear as arg0, making root-cause analysis harder.
How It Works
The skill runs against a source workspace, defaulting to the current directory. It connects to a remote JVM through a local debug service and supports:
- Breakpoints: by class and line, source path and line, method name, or overloaded method; simple conditions can be attached.
- Context inspection: threads, current stack, current variables, and deeper object fields via
fields. - Object display: first-level object fields are expanded,
Stringvalues resolved, wrappers unboxed, and common collections rendered. - Stepping: step over, step into, and step out to follow execution and return values.
- Parameter recovery: when
LocalVariableTableis missing, it attempts to recover method parameter names from source.
Boundaries
The remote JVM must expose a JDWP debug port, and the workspace should map to the project source root. Target classes must be loaded before breakpoints can be set. A hit suspends the thread, so you must continue or step. Method breakpoints depend on line-number info, and conditional breakpoints work best with simple comparisons. If source and runtime versions differ, recovered names may be inaccurate, and all local variable names are not guaranteed.
Use Cases
- Reproduce an intermittent NPE by connecting to a remote JDWP JVM and inspecting local variables and object fields.
- Recover method parameter names from source when the JVM lacks debug info and verify request inputs.
- Debug a slow API by setting class, line, or method breakpoints, then step through execution and return values.
- Inspect complex collections with fields, expanding first-level fields, strings, and map or list elements.
Best For
- Backend engineers troubleshooting production Java services who need live breakpoint inspection without restarts.
- Maintainers of legacy projects missing debug info who need to recover method parameter names from source.
- SREs debugging intermittent API failures who need remote conditional breakpoints and stepping to reproduce issues.
- Developers analyzing complex object payloads who need to expand collection fields and object references.
Related Skills
Analyzes code to extract control and data flow, then outputs Markdown with Mermaid source and high-resolution PNG diagrams.
For development and programming scenarios around VSCode and TypeScript IDE.
A TypeScript-oriented Windmill Wrap development reference.
A Python-based Selenium wrapper for engineering browser automation workflows.