Debug AI Agents with Bottrace: Interactive CLI Debugger

I just open-sourced bottrace --- a debugging tool I built because I got tired of watching AI agents guess when they should be tracing. I've been a developer for a long time, and debuggers have always been my go-to. Honestly, I don't understand why so many modern developers skip them. The ability to freeze execution, walk the call stack, and examine every variable in scope --- that's how you actually understand what code is doing. When I started working heavily with AI agents, I noticed they were doing the equivalent of adding print statements everywhere. And print statements cost tokens --- a lot of them. Worse, on larger codebases, I kept seeing agents find the first thing that looked like the target and start working there, when the real code was something similar but in a completely different file. The call stack tells you the truth. It shows you exactly what called what, and where. But agents weren't doing that. They couldn't --- debuggers are interactive, and agents can't use a UI. So I built bottrace. It gives agents the same runtime visibility a debugger gives me, but through structured CLI output. Now when my agents hit a confusing codebase, the rule is simple: when in doubt, trace it first. bottrace run app.py --call-counts shows what's actually getting called and where. bottrace run app.py --calls --max-depth 3 maps the real execution path. No guessing. No grepping for symbols and hoping you found the right one. It's been especially valuable on large codebases where there's enough complexity that it takes hundreds of tokens just to get oriented. A single trace cuts through all of that. Zero dependencies. Python 3.10+. Works anywhere --- SSH, CI, containers. pip install bottrace https://lnkd.in/g_tym8BW

Very cool! Wonder how easily this could be generalized to support broader range of languages…

Like
Reply

To view or add a comment, sign in

Explore content categories