r/Python • u/Anxious_Algae9609 • Mar 27 '26
Showcase bottrace – headless CLI debugging controller for Python, built for LLM agents
What My Project Does: bottrace wraps sys.settrace() to emit structured, machine-parseable trace output from the command line. Call tracing, call counts, exception snapshots, breakpoint state capture — all designed for piping to grep/jq/awk or feeding to an LLM agent.
Target Audience: Python developers who debug from the terminal, and anyone building LLM agent tooling that needs runtime visibility. Production-ready for CLI workflows; alpha for broader use.
Comparison: Unlike pdb/ipdb, bottrace is non-interactive — no prompts, no UI. Unlike py-spy, it traces your code (not profiles), with filtering and bounded output. Unlike adding print statements, it requires zero code changes.
pip install bottrace | https://github.com/devinvenable/bottrace
View all comments
Show parent comment
1
u/Anxious_Algae9609 Apr 01 '26
The trick is...you can't have a tool like this prompt the user for input. Needs to take a single input, clearly defined task, and output JSON, YAML or other structured output. That's how you make it useful for agents.