Skip to content

Released version 2.12.0

Latest

Choose a tag to compare

@dg dg released this 04 May 00:28
· 18 commits to master since this release

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 .md sibling, 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 @tracySkipLocation and 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 $key parameter 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 in section-stack-exception.php. BlueScreen::$collapsePaths and isCollapsed() remain as @deprecated shims 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