Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Delve

$ dlv Community Med Risk
go-delve · Code & DevOps · MIT · macos / linux / windows

dlv (Delve) is the purpose-built debugger for Go programs, goroutines, and tests, handling Go's runtime scheduler and DWARF metadata accurately. Interactive by default, it supports --headless --api-version=2 JSON-RPC and dlv dap modes for scripted/IDE automation.

FCRS-1.0 Score
73 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install delve
CLI vs MCP Decision CLI Only

Go runtime-aware debugger tied to local Go builds and OS ptrace/mach APIs.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Interactive (dlv) prompt blocks by default, though --headless --api-version=2 and dlv dap provide structured JSON-RPC/DAP endpoints (not single-shot CLI JSON).

  • Interactive REPL by default unless --headless or dlv dap is used
  • Supports piped --init <file> script execution
Trust & Safety 19 / 25

Local debugging with zero auth; --headless opens a TCP listener that must stay bound to 127.0.0.1 to prevent remote execution.

  • --listen=127.0.0.1:2345 keeps debug RPC local
Setup & Portability 13 / 15

First-class macOS, Linux, and Windows support via brew install delve and go install.

  • Official cross-platform Go binary
Utility & Efficiency 11 / 15

Essential for inspecting Go goroutines, channels, and core dumps (dlv core), though heavier than go test for routine checks.

  • Goroutine-aware stack/variable inspection
Maintenance & Lineage 7 / 10

Community-governed go-delve/delve project under MIT license, backed by Go IDE tooling.

  • Official debugger integrated into VS Code Go and GoLand
Docs & Verifiability 6 / 10

Clear --help subcommands and Markdown docs in the GitHub repo.

  • CLI and API docs in Documentation/cli

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; debugs local Go binaries, tests, and core dumps.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source Go debugger; free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Delve (dlv) Agent Rules
- Never run bare `dlv debug` or `dlv test` without `--headless` or piped stdin commands, as the `(dlv)` REPL blocks.
- Bind `--headless` strictly to `127.0.0.1:<port>` so the debug server is never exposed to the network.
- Prefer `gotestsum` or `go test -v` unless goroutine/stack inspection is explicitly required.

Agent-Ready Command Recipes

Safe Read-Only Queries

Verify Delve version and CLI capabilities
dlv version

Prints the installed Delve version and build info without compiling or launching a target.

Run a headless debug server for a Go test
dlv test ./pkg/auth --headless --listen=127.0.0.1:2345 --api-version=2 -- --test.run=TestToken

Compiles and launches a JSON-RPC v2 headless debug server bound to localhost for scripted DAP/RPC clients.

Strengths for Agents

  • + Understands Go goroutines, interfaces, and runtime frames far better than gdb/lldb.
  • + --headless --api-version=2 and dlv dap expose structured debug protocols.

Caveats & Pitfalls

  • ! Default (dlv) REPL blocks headless agents; no one-shot JSON output mode on stdout.
  • ! Headless debug servers open a local TCP port and wait for client RPC commands.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI