debuganything
v1.1.0Observe any running process from your agent.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
readiness 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.
attach attach
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.
| Parameter | Type | Description |
|---|---|---|
target * | string | pid, container name/id, k8s pod (ns/name), or a command line (with kind=command) |
kind | string | Defaults to auto-detect: numeric → pid, ns/name → pod, else container. Spawning a command requires kind: "command". |
detach detach
Stop any running captures for the session, finalize the report, keep artifacts under ~/.debuganything/sessions/<id>/.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
list_processes list_processes
ps-style list (pid, comm, cpu, mem, user, container) for picking a target. Optional substring filter.
| Parameter | Type | Description |
|---|---|---|
filter | string | Substring match on command / args / user |
limit | integer |
trace_syscalls trace_syscalls
Linux 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.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
categories | array | |
duration_s | integer |
profile_cpu profile_cpu
CPU profile for N seconds: py-spy (Python), perf (native/Node on Linux), sample (macOS). Returns top frames (self/total), hottest stacks, flamegraph.svg artifact.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
consent | boolean | |
duration_s | integer |
dump_stacks dump_stacks
Instant 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).
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
consent | boolean | Node targets without --inspect: required to send SIGUSR1, which leaves Node's inspector open on 127.0.0.1 until the process exits. Ask the user first. |
inspect_sockets inspect_sockets
lsof/ss view of the target: listening ports, established connections grouped by remote, states (CLOSE_WAIT pileups, TIME_WAIT counts), fd count vs ulimit.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
inspect_files inspect_files
Open file descriptors by type, growth over a short window, largest open files, deleted-but-open files (disk full but nothing there).
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
window_s | integer | Observe fd growth over this many seconds (0 = single snapshot) |
capture_traffic capture_traffic
tcpdump 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.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
consent | boolean | Required. Packet capture may contain secrets; ask the user first. |
duration_s | integer | |
filter | string | Extra BPF filter ANDed with the target's ports |
snapshot_memory snapshot_memory
RSS/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.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
consent | boolean | Node targets without --inspect: required to send SIGUSR1, which leaves Node's inspector open on 127.0.0.1 until the process exits. Ask the user first. |
heap | boolean | Take a heap snapshot where supported (Node). Set false for metrics only. |
locals | boolean | Python: include local variable values in the stack dump (may contain user data or secrets). Off by default. |
window_s | integer | Sample RSS over this many seconds |
diff_runs diff_runs
Diff 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.
| Parameter | Type | Description |
|---|---|---|
a * | string | run id of the earlier result; '<session_id>:<run>' reads a baseline run from another session (e.g. a recorded healthy run) |
b * | string | run id of the later result; '<session_id>:<run>' works here too |
session_id * | string |
container_info container_info
docker inspect/stats/top/logs tail for the target container, host pid mapping, cgroup limits: throttled? OOM-killed before? restarts?
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
report report
Markdown report of the whole session: findings, evidence excerpts, artifact paths. Optionally written to a .md file inside the current directory or the session directory.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
html | boolean | Also render a self-contained report.html (shareable: ranked findings, expandable evidence, embedded flamegraphs) |
out | string | Optional path to also write the markdown to |
import_artifact import_artifact
Analyze 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).
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to the raw output file you captured yourself (e.g. with sudo) |
session_id * | string | |
tool * | string | What produced the file |
duration_s | integer | How long the capture ran, when the file has no timestamps (profiles) |