Tracy learns to speak AI. This release turns every error screen, debug bar, and dump() call into a first-class citizen of agentic workflows β when an AI coding assistant hits your app, it gets a structured, token-efficient view of exactly what went wrong instead of a blob of HTML. Plus the usual spit-and-polish: a unified "transparent frames" model across BlueScreen and Dumper, a new breadcrumb in logged exceptions showing where Debugger::log() was called from, and a few quality-of-life API additions.
β¨ New Features
- AI agent support β Tracy now detects AI agents (via Helpers::isAgent()) and serves them tailored output instead of HTML:
- BlueScreen renders a dedicated agent template for exceptions, making stack traces and context machine-readable
- Debug Bar ships an agent-friendly render path with bespoke templates for the Warnings and Dumps panels
- Debugger::dump() writes to the console when an agent is on the other end, so your dumps land where the agent actually looks
- Production error page now includes a hint for agents so they don't have to guess what happened behind the generic 500
- Markdown companion files β every HTML error log now gets a
.mdsibling, giving agents a clean, readable version of the same crash - Debugger::$transparentPaths β a public, autodetected list of "framework" paths (Tracy, Nette, Latte) whose frames are skipped when locating the real call site. Path-based, so it catches anonymous functions and closures that class-based detection missed
- Helpers::findCallerLocation() β walks the backtrace and returns the first frame outside
$transparentPaths, respecting@tracySkipLocationand internal functions. Reusable across Tracy instead of buried in Dumper - Helpers::countTransparentFrames() β companion helper returning the number of leading transparent frames in a trace
- Logger records caller location β exception reports now show a "Logged from ..." footer pointing to the exact line where
Debugger::log()was called, alongside the existing "Report generated at" entry - Dumper::toText() β gained an optional
$keyparameter so you can label the dumped value in text output
β»οΈ Code Refactoring
- BlueScreen stack-trace collapse unified with
Debugger::$transparentPathsβ one source of truth for which frames to hide, replacing the inline logic insection-stack-exception.php.BlueScreen::$collapsePathsandisCollapsed()remain as@deprecatedshims so existing configuration keeps working - BlueScreen internals cleaned up, including a new
prepareStack(\Throwable)method that strips Tracy's own handler frames and returns the frame index to expand by default