telescope-debugging

Installation
SKILL.md

Telescope records every request, job, and command as a batch: the entry itself and every query, cache operation, log, event, exception, and view it produced. The two commands below read this data from the terminal. Prefer them to the web UI.

Workflow

  1. Find the entry. Run php artisan telescope:list request (or exception, job, query, or cache). Choose the row by URI, class, or duration, then copy its UUID. Skip this step when you want the most recent entry.

  2. Show the batch. Run php artisan telescope:show <uuid>, or php artisan telescope:show latest:request. The output is the entry's own detail followed by Queries, Exceptions, Cache, and Logs sections, all from the same batch.

  3. Diagnose from the flags. In the Queries table, DUP marks queries with the same SQL pattern, which usually indicates an N+1. The Source column shows the file and line that ran the query, shortened to a basename; use --json for the full path. SLOW marks queries over the configured threshold. The Cache header shows hits, misses, and hit rate. An exception entry shows the message, code context, and stack trace.

  4. Finish when the finding identifies a file and line or a specific query, rather than only a symptom.

JSON output

Both commands accept --json. Prefer it to table output when you need exact values, want to filter results, or expect long output. telescope:list --json prints an array of entries. telescope:show --json prints {"entry": {...}, "batch": [...]}. Its batch array is in chronological order and already filtered by --type. When no entries match, telescope:list --json prints [] rather than a message.

Every entry has id, batch_id, type, content, family_hash, and created_at. The content keys match the Telescope UI for that type. For example, a query has sql, time, slow, file, and line, while an exception has class, message, file, line, and trace. Two fields are not populated by these commands: tags is always [] (use --tag to filter rather than reading tags from the output), and sequence is null when the entry is addressed by UUID.

Installs
1
GitHub Stars
5.2K
First Seen
7 days ago