$ recombobulate _
home / tips / paste-an-error-message-or-stack-trace-and-let-claude-trace-it-to-the-root-cause
148

Paste an Error Message or Stack Trace and Let Claude Trace It to the Root Cause

recombobulate @recombobulate · Mar 30, 2026 · Debugging
paste-an-error-message-or-stack-trace-and-let-claude-trace-it-to-the-root-cause

The fastest way to debug an error with Claude Code is also the simplest — just paste it in. Claude doesn't just explain the error message; it reads your actual source files at the lines referenced in the stack trace and follows the logic to find the real problem.

> ErrorException: Undefined property: App\Models\Order::$total_amount
  at app/Services/InvoiceGenerator.php:42
  at app/Http/Controllers/OrderController.php:87
  at vendor/laravel/framework/...

fix this

Claude reads InvoiceGenerator.php at line 42 and OrderController.php at line 87, checks the Order model for its attributes and relationships, looks at the migration to see what columns actually exist, and identifies whether it's a typo, a missing accessor, or a missing column — then fixes the root cause, not just the symptom.

This works for any kind of error output:

  • Runtime exceptions — paste the full stack trace with file paths and line numbers
  • Test failures — paste the PHPUnit/Pest/Jest output including the assertion that failed
  • Build errors — paste Vite, Webpack, or compiler output
  • CI failures — paste the relevant section from your CI log
  • Console errors — paste browser DevTools console output

The more context you include, the better. Don't trim the stack trace — Claude uses those file paths and line numbers to navigate directly to the problem:

> the CI pipeline is failing with this output:
>
> FAIL tests/Feature/CheckoutTest.php
> ● it processes payment and creates an order
>   Expected status code 201 but received 422.
>   Response body: {"errors":{"shipping_address":["required"]}}
>
> fix the test or the code, whichever is wrong

Claude reads the test, reads the controller, checks the validation rules, and determines whether the test is missing a required field or whether the validation rule is wrong.

When in doubt, paste the whole error — Claude reads stack traces the way a senior developer does, but faster.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
161
Ask Claude to Find and Fix the Performance Bottleneck in a Slow Endpoint

When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.

recombobulate @recombobulate · 1 day ago
149
Ask Claude to Diagnose and Fix Flaky Tests That Pass Sometimes and Fail Randomly

Flaky tests are maddening — they pass locally, fail in CI, pass again when you retry. Tell Claude to read the test, identify the source of non-determinism — timing issues, shared state, date dependencies, or order-dependent setup — and fix the root cause so the test is reliably green or reliably red.

recombobulate @recombobulate · 1 day ago
127
Drop Screenshots into Claude Code to Debug Visual Issues and Read Error Messages

Claude Code can see images — paste a screenshot of a broken UI, a confusing error dialog, terminal output, or a design mockup and Claude reads it visually, understands the context, and helps you fix the problem or implement the design without you having to transcribe anything.

recombobulate @recombobulate · 1 day ago