jdb-debugging
JDB Debugging via tmux
Debug running JVM applications using jdb controlled through tmux panes.
Setup
With dedicated pane (preferred): User provides pane ID (e.g., %265)
tmux send-keys -t %265 "jdb -attach PORT" Enter
sleep 2
tmux capture-pane -t %265 -p
With new session:
tmux new-session -d -s jdb "jdb -attach PORT"
sleep 2
tmux capture-pane -t jdb -p
Commands
All commands follow this pattern:
tmux send-keys -t PANE "COMMAND" Enter
sleep 0.5
tmux capture-pane -t PANE -p
Breakpoints
# Simple method (non-overloaded)
stop in com.example.MyClass.myMethod
# Overloaded method - first list methods to find signature
methods com.example.MyClass
# Then use exact signature
stop in com.example.MyClass.execute(java.lang.Object)
# Line breakpoint (often fails with Scala due to line mismatch)
stop at com.example.MyClass:42
Navigation
| Command | Action |
|---|---|
cont |
Continue execution |
step |
Step into |
next |
Step over |
step up |
Step out of current method |
Inspection
| Command | Action |
|---|---|
where |
Stack trace |
locals |
Local variables |
print varName |
Print variable value |
print obj.field |
Print object field |
threads |
List all threads |
thread THREAD_ID |
Switch to thread |
Breakpoint Management
| Command | Action |
|---|---|
clear |
List breakpoints |
clear com.example.MyClass.myMethod |
Remove breakpoint |
Scala/Kotlin Notes
- Line breakpoints often fail - use method breakpoints instead
- For overloaded methods, use
methods ClassNameto find exact JVM signature listcommand typically fails (source not found) but inspection commands work fine
Cleanup
# Session approach
tmux kill-session -t jdb
# Pane approach - just exit jdb
tmux send-keys -t %265 "quit" Enter
More from markus1189/nixos-config
sourcegraph-search
Search code using Sourcegraph CLI. Use when (re)searching codebases, finding implementation examples, analyzing code patterns
22elfeed
Search the user's Emacs elfeed RSS feed database containing curated feeds from Reddit, blogs, YouTube, GitHub releases, and newsletters. Use when the user asks about articles they've read, mentions RSS feeds or 'something I read', wants to research topics from their curated sources (programming, AI, security, NixOS, Emacs, etc.), or needs to triage unread items.
1telegram
Direct integration with Telegram Bot API for checking inbox messages and sending messages (text, photos, documents) to chats. Triggers when users request 'check Telegram inbox', 'check messages', 'send message to [chat]', or mention Telegram bot interactions. Requires TELEGRAM_BOT_TOKEN environment variable.
1plantuml
Generates diagrams from text using PlantUML. Use when creating sequence diagrams, class diagrams, activity diagrams, C4 architecture diagrams, Gantt charts, mind maps, ER diagrams, or any visual diagram. Triggers on: diagram requests, architecture visualization, UML, flowcharts, system design, data modeling.
1transcribe-audio
Transcribes audio files (mp3, wav, ogg, m4a, flac, webm) using Gemini API via Portkey, saves transcripts as markdown, and supports follow-up analysis. Use when the user asks to transcribe audio, summarize a meeting recording, check a voice note, extract action items from a recording, asks what was discussed in an audio file, or mentions processing audio files in any way.
1humanizing-prose
Guides writing prose that avoids common AI/LLM tells, and reviews existing text for AI tells with concrete reformulation suggestions. Use when the user asks to 'humanize' text, 'de-AI' writing, review text for AI tells, write naturally, avoid sounding like AI, make text sound human, or mentions AI detection concerns.
1