readiness
Report OS, arch, which providers (strace, py-spy, perf, lsof, tcpdump, gdb/lldb, docker...) are usable, what is missing and how to install it, and permission status (ptrace_scope, sudo, SIP). Always call this first.
Takes no parameters.

io.github.shreyassaw5394Published by GitHub account shreyassaw5394v1.1.0Updated Nov 4, 2026
Observe any running process from your agent. strace, py-spy, perf, lsof, tcpdump as evidence.
Observes running processes, containers and pods with local tools like strace, py-spy, perf, lsof and tcpdump, returning structured evidence an assistant can…
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
Observe any running process. No breakpoints, no restarts, no instrumentation.
One MCP server and CLI that gives any coding agent — Claude Code, Codex, Cursor, Gemini CLI — eyes on running software: syscalls, CPU flamegraphs, thread stacks, sockets and file descriptors, packets, heap retainers, container state. Battle-tested local tools (strace, py-spy, perf, lsof, tcpdump, gdb/lldb, Node's inspector) do the observing; Debug Anything turns their output into structured evidence an agent can reason about and a human can audit.
[npm] [MIT] [MCP] [Node] [npm downloads] [PyPI downloads] [GitHub stars] [Discord]
Quick start · How Debug Anything works · What you can observe · Showcases · Workflows · Python / LangChain / CrewAI · Safety · FAQ · Roadmap · Community
One command against any pid, container or pod: attach → the right tools for the symptom (slow / leak / hang / crash / triage) → ranked findings, every one citing evidence ids → detach. Hooking it to your agent instead: npx debuganything setup. No install at all? Paste tool output in the browser.
Website: https://debuganything.dev · Community: Discord · Discussions · Only ever download Debug Anything from this repo, the
debuganythingnpm/PyPI packages, or that site.
Step-through debuggers over MCP already exist and are good: debugmcp/mcp-debugger (7 languages), microsoft/DebugMCP (VS Code), jdwp-mcp (Java), jkolo/debug-mcp (.NET), pprof-mcp-agent (Go). They need a debug adapter, a debug port, or an instrumented/restarted target, and they assume you already know where to put the breakpoint.
Debug Anything is the layer before that: black-box observation of any pid, container or pod with zero instrumentation, turned into evidence.
mcp-debugger is for when you know where to put the breakpoint. Debug Anything is for when you don't.
They are complementary. When Debug Anything localizes a problem to a function or thread, its suggested_next includes the handoff: "attach a step debugger (e.g. mcp-debugger) at file:function" — and, for native symbols, "decompile parse_frame in libfoo.so with your static-analysis tool". More situations: docs/examples.md.
Software is written once and runs forever, and most engineering pain is in the running part. Agents just got very good at the writing part. They are still blind to the running part — an agent can read every line of your code and still cannot tell you why the process in front of it is eating 4 GB. Observability vendors solved this for humans with dashboards. Nobody has solved it for agents.
Debug Anything is a sensory layer for software agents. The plan:
Every interface is designed so step-1 code survives to step 4: targets are abstract (pid today, container and pod now, host next), adapters are pluggable, and every result has the same evidence schema. Nothing assumes localhost.
why is the whole product in one command: it runs readiness, attaches, picks the right observation battery for the symptom, and prints ranked findings with the evidence ids to back them. Everything below is that same engine, wired into your agent.
Detects Claude Code, Codex, Cursor and Gemini CLI, shows the exact config entry it will add, backs up the file, writes it, and installs the debug-anything skill where the agent supports skills. Then restart your agent.
One-click installs: [Install MCP Server in Cursor] [Install in VS Code] [Install in VS Code Insiders]
Claude Code plugin: /plugin marketplace add shreyassaw5394/debuganything then /plugin install debuganything@debuganything · Gemini CLI: gemini extensions install https://github.com/shreyassaw5394/debuganything · Skill: npx skills add shreyassaw5394/debuganything
My API gets slow after a few minutes — attach to it and tell me why, with evidence.
Something is holding port 8080. Who?
This Python worker hangs after ~20 requests. Find out what it is waiting on.
The agent calls readiness, attach, then the right tools, and answers with findings that cite evidence ids — or tells you what it could not observe and why.
why attaches, runs the right tools for the symptom, prints each result, and
ends with a ranked summary and the report path. Skips tools readiness says
you cannot run instead of failing.
Every command takes --json and prints the exact ToolResult. See docs/cli.md.
Every teammate's Claude Code and Cursor now gets Debug Anything from the repo, with the rule telling agents when to use it. Adoption flow day by day: docs/workflows.md.
The debug-anything skill (investigation orders, evidence rules, consent
etiquette) is installed by setup for Claude Code, Codex and Gemini CLI, and
is also available through skills.sh:
A second skill, inspect-product, is for auditing a whole product rather than chasing one bug: the agent walks your running app as a brand-new user, observes the runtime underneath it with these tools, and returns ranked findings that each carry a reproduction and proof. Ask it to "review the product and tell me what to fix before launch". Both skills install with npx debuganything setup.
attach resolves a target (pid, container, pod, or a command spawned under capture) into ~/.debuganything/sessions/<id>/. Every tool result is saved as a run (profile_cpu#2), so diff_runs can compare before/after and report can assemble the whole investigation.Finding without evidence_ids is rejected by the schema. confidence: "inferred" is allowed but must be stated. Agents only get to claim what the evidence supports. Full schemas: docs/mcp-contracts.md.readiness computes what works on this machine. Parsers are pure functions tested on real captured output. Adding one takes ~80 lines: CONTRIBUTING.md.dea_slow, dea_leak, dea_hang, dea_crash, dea_port_busy are guided investigations: the order of tools, what to look for, and the rule to never state a cause without an evidence id.New in 0.4: Java thread dumps (jstack, live or imported), Go goroutine dumps, a paste-in browser analyzer, shareable HTML reports (debuganything report --html), cross-session baseline diffs (debuganything diff --session now '<baseline>:<run>' <run>), and CI hang forensics as a GitHub Action.
Honest status: everything above was run live on Linux (Debian 12 container, root) and macOS 15 (own processes, no sudo) against the example apps. bpftrace scripts are staged but not wired to a tool yet. Install commands per OS: docs/providers.md.
Real-world situations — CLOSE_WAIT pileups and EMFILE, disk full but du disagrees, Postgres pool exhaustion, a Celery deadlock, a blocked Node event loop, OOMKilled pods, DNS on every request, EADDRINUSE after a crash, a native hot spot you cannot read — each with the session, the evidence and the fix: docs/real-world.md.
Ten copy-paste situations — slow API, leak, hang, port in use, container crash, spawn-under-observation, prove-the-fix, CI regression gate, consented packet capture, Python agents — are in docs/examples.md.
Reproducible with examples/. Full transcripts in docs/showcases.md; a complete report Debug Anything wrote itself is in docs/example-report-leaky-node.md.
leaky-node — HTTP server that keeps every request body alive in a module-level array, plus a /slow route doing readFileSync in a loop and an 800 ms timer.
snapshot_memory ×2 + diff_runs: RSS 85 → 172 MB (+102 %), heap 37 → 97 MB, the top retainer is an Array whose retained size grew 17 → 47 MB. trace_syscalls (8 s): 5 600 openat/statx lookups and 3 314 read() calls — "sync I/O in a loop", and epoll_pwait sleeping ~800 ms at a time.
deadlock-py — threaded server that takes two locks in opposite order after request 20.
dump_stacks: worker-ab-20 blocked at app.py:26 [with lock_b:], worker-ba-20 blocked at app.py:33 [with lock_a:], eight request threads joined on them, no thread running → "likely deadlock", with the handoff to a step debugger at worker_ab.
busy-port — a process holding :8080 and a script failing with EADDRINUSE.
debuganything port 8080: port 8080 is held by pid 47508 (node, user shreyassawant) in LISTEN — command: node server.js. Debug Anything will not kill it; decide yourself.
Once installed, agents are told to reach for Debug Anything on their own: when a command they ran hangs, a test times out, output shows EADDRINUSE / ECONNREFUSED / EMFILE / exit 137 / OOM / segfault, a server they started does not respond, or you mention slow, hang, leak or crash. For Claude Code, setup also installs a tiny hook that spots those signals in command output and prompts and nudges the model toward the right Debug Anything tool. Read-only observation needs no permission; capture_traffic always does. Details and the off switch (--no-hooks): docs/proactive.md.
Each adapter exposes the same 14 tools with the same ToolResult. Frameworks
with native MCP support can skip the package and run npx -y debuganything serve.
Details: python/README.md.
Because today it cannot. Agents cannot attach to a process; they fumble strace/perf/lsof syntax and flags; a 10 s strace is 1.5 MB of text that blows the context window; and when they cannot measure, they guess — confidently. Debug Anything gives them eyes (the right tool, the right flags, inside hard caps) and evidence (summaries that point to raw artifacts, findings that must cite them). You get a diagnosis you can audit instead of a plausible story.
SIGUSR1 to enable the inspector, which then stays open on 127.0.0.1 until the process exits, and only with consent: true.capture_traffic requires consent: true, and so do snapshot_memory/dump_stacks when they would open a Node inspector; the skill tells agents to ask you first. attach spawns a program only with kind: "command".0700 and files 0600; they can hold secrets from the observed process. debuganything sessions prune deletes them.ok: false and the exact command you could run yourself. readiness reports ptrace_scope, perf_event_paranoid, SIP and sudo -n status up front.password=, API keys, private keys and user:pass@ URLs are redacted in everything returned to the agent. Raw artifacts on disk are not redacted — treat ~/.debuganything/sessions/ as sensitive.Details: docs/safety.md · DISCLAIMER.md · SECURITY.md
Which agents work? Anything that speaks MCP over stdio. setup knows Claude Code, Codex, Cursor and Gemini CLI; for others add {"command":"npx","args":["-y","[email protected]","serve"]} to the MCP config (docs/installation.md).
Do I need to install strace / perf / py-spy? Only for the tools you want. readiness lists what is usable and prints install hints. lsof, ps and Node's inspector work out of the box on Linux and macOS.
Does it need root? Not for your own processes on macOS (lsof, sample, lldb, inspector) or on Linux with ptrace_scope=0. py-spy and fs_usage on macOS and tcpdump everywhere do; Debug Anything prints the exact sudo command, you run it, and debuganything import <tool> <file> analyzes the output with the same parsers.
What can't it see on macOS? There is no strace or perf. fs_usage (via import) covers file and network calls; sample, lldb, lsof and the Node inspector cover the rest. For the full syscall and kernel-time picture, run the target in a Linux container (docker/linux-lab).
Does Debug Anything upload anything? No. No network calls, no telemetry, no update checks except the explicit debuganything update.
Can it debug a Docker container? On Linux, yes — attach by container name and every tool works through the host pid. On macOS the Docker VM hides pids, so only container_info works from the host; run Debug Anything inside the container instead (docker/linux-lab has an image with every provider).
How is this different from a step debugger? Debug Anything never stops your program at a line. It samples, traces and snapshots a running process and tells you where to look. Then hand off to mcp-debugger or your IDE to look inside.
Where are the artifacts? ~/.debuganything/sessions/<id>/ (DEA_HOME to override). debuganything sessions list / debuganything sessions prune.
bpftrace canned scripts · Kubernetes pods via ephemeral debug containers · Windows (ETW, procdump) · Java (async-profiler, jcmd Thread.print) · Go (pprof, delve goroutine dumps) · Rust/C++ DWARF unwinding · eBPF-first tracing on Linux · Python tracemalloc/memray · Node CPU via inspector Profiler · lock-owner graphs · remote agent mode over SSH. Full list: docs/roadmap.md.
main is protected: every change is a pull request reviewed by a code owner.
An adapter is ~80 lines: declare platforms/requires/tools, build the command, run it through runCapped, parse with a pure function, emit evidence and findings through ResultBuilder (which refuses findings without evidence). Capture the real tool output once into tests/fixtures/ and test the parser on it. Recipe in CONTRIBUTING.md.
Everyone who has landed a pull request. Add an adapter, a fixture or a doc and your face shows up here.
Numbers across npm, PyPI, GitHub and the MCP Registry: bash scripts/stats.sh.
MIT — see LICENSE. Debug Anything is a free, non-commercial passion project by an independent developer, provided "as is", without warranty of any kind; the authors and contributors accept no liability for outages, data exposure, or any other damage arising from its use. Debug Anything attaches observation tools to running software: only observe systems you own or are explicitly authorized to debug — you are solely responsible for authorization and for complying with applicable laws and policies. Observation is not free (ptrace pauses targets; captures and heap dumps can contain secrets), findings are automated diagnostics rather than professional advice, and Debug Anything is an independent project developed by its contributors in their personal capacities, unaffiliated with any employer or with the third-party tools it orchestrates. Full terms: DISCLAIMER.md.
Source: README.md at commit 9c63e52
Report OS, arch, which providers (strace, py-spy, perf, lsof, tcpdump, gdb/lldb, docker...) are usable, what is missing and how to install it, and permission status (ptrace_scope, sudo, SIP). Always call this first.
Takes no parameters.
Resolve a target (pid, container, k8s pod, or a command to spawn under capture) and open a session. Returns session_id used by every other tool. Attaching to a pid, container or pod modifies nothing; kind: "command" spawns the given program.
kindtargetrequiredStop any running captures for the session, finalize the report, keep artifacts under ~/.debuganything/sessions/<id>/.
session_idrequiredps-style list (pid, comm, cpu, mem, user, container) for picking a target. Optional substring filter.
limitfilterLinux strace of the target for N seconds: top syscalls by total time and count, slowest individual calls, error counts (ENOENT/EAGAIN/ECONNREFUSED...), blocked waits. Raw log saved as artifact.
categoriesduration_ssession_idrequiredCPU profile for N seconds: py-spy (Python), perf (native/Node on Linux), sample (macOS). Returns top frames (self/total), hottest stacks, flamegraph.svg artifact.
consentduration_ssession_idrequiredInstant snapshot of every thread's stack (py-spy dump / gdb / lldb / Node inspector). The key tool for hangs and deadlocks; flags threads waiting on the same lock. Node targets without --inspect need consent: true (SIGUSR1 opens the inspector until the process exits).
consentsession_idrequiredlsof/ss view of the target: listening ports, established connections grouped by remote, states (CLOSE_WAIT pileups, TIME_WAIT counts), fd count vs ulimit.
session_idrequiredOpen file descriptors by type, growth over a short window, largest open files, deleted-but-open files (disk full but nothing there).
window_ssession_idrequiredtcpdump scoped to the target's ports for N seconds (max 30). Per-remote bytes/packets, retransmits, RSTs, DNS queries, TLS SNI. .pcap artifact. REQUIRES consent: true — ask the user first.
filterconsentduration_ssession_idrequiredRSS/VSZ sampled over a window; Node: heap snapshot with top retainers by retained size; Python: py-spy dump (locals: true adds variable values). Node targets without --inspect need consent: true (SIGUSR1 opens the inspector until the process exits). Take two and diff_runs them to find what grows.
heaplocalsconsentwindow_ssession_idrequiredDiff two prior runs of the same tool in this session (e.g. snapshot_memory#1 vs snapshot_memory#2, profile_cpu#1 vs #2): what grew, appeared, disappeared.
arequiredbrequiredsession_idrequireddocker inspect/stats/top/logs tail for the target container, host pid mapping, cgroup limits: throttled? OOM-killed before? restarts?
session_idrequiredMarkdown report of the whole session: findings, evidence excerpts, artifact paths. Optionally written to a .md file inside the current directory or the session directory.
outhtmlsession_idrequiredAnalyze raw tool output you captured yourself (e.g. `sudo strace …`, `sudo fs_usage …`, `perf script`, `py-spy dump`, `lsof -F`, `tcpdump -nn -tt -r`) and turn it into the same evidence and findings Debug Anything would produce. Use when Debug Anything could not run the tool (no root, macOS).
pathrequiredtoolrequiredduration_ssession_idrequired90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
npx debuganything why <pid> # or: why api-container --symptom leaknpx debuganything why <pid|container|pod> # symptom flags: --symptom slow|leak|hang|crashnpx debuganything setupnpx -y [email protected] why 12345 --symptom leak # or: slow | hang | crash | triagedebuganything why my-container --symptom crashdebuganything why -- node server.js # spawn it under observationnpx -y [email protected] readinessdebuganything ps --filter nodeS=$(debuganything attach 12345 --json | jq -r .session_id)debuganything profile --session $S --duration 10debuganything sockets --session $Sdebuganything report --session $S --md report.mddebuganything detach --session $Sdebuganything port 8080 # who holds a port — no session neededcd my-project && debuganything init # .mcp.json + .cursor/mcp.json + a rule in AGENTS.md/CLAUDE.md — commit themnpx skills add shreyassaw5394/debuganythingdebuganything update # re-pins agent configs; or: npx debuganything@latest setupagent ──MCP──▶ Debug Anything server ──▶ dispatcher ──▶ adapter (strace | py-spy | perf | lsof | tcpdump | gdb/lldb | inspector | docker) │ │ build command → run with caps → write raw artifact → parse → aggregate ▼ ▼ ToolResult { findings[] ──cite──▶ evidence[] ──point──▶ artifacts[] } + limitations + suggested_nextpip install debuganything # plain client (no deps; uses npx under the hood)pip install 'debuganything[langchain]' # debuganything.langchain.debuganything_tools()pip install 'debuganything[llamaindex]' # debuganything.llamaindex.debuganything_tools()pip install 'debuganything[crewai]' # debuganything.crewai.debuganything_tools()from debuganything import DebugAnythingdebuganything = DebugAnything()s = da.attach(12345)print(da.findings(da.profile_cpu(s, duration_s=10)))da.detach(s)