Hi everyone,
I’d like feedback on a small enhancement to the debug exception pages shown in development. I’ve opened a PR already and would appreciate early input before it goes further. Here you can find the PR
The idea is to add a selectable, preformatted “Prompt for AI agents” block that contains a concise summary of the exception, request, filtered params, environment, and a short backtrace excerpt.
Motivation:
These days when debugging locally, many developers now ask AI tools for help. Today, they manually summarize the exception page. A structured prompt can reduce errors, speed up triage, and keep the information scoped to what’s already visible (no extra data collection). It stays local-only and appears only in the detailed exception pages.
What it would include:
Exception class and message
Request method and path
Controller/action (if available)
Filtered parameters (same as existing debug page)
Rails/Ruby version and environment
First few backtrace entries
A short “task list” for the AI agent (root cause, fix suggestion, tests)
Notes:
Only affects the HTML debug page, not API/XHR responses.
Uses the existing filtered parameters; no new data exposure.
Implemented as a partial so it’s easy to adjust or remove.