$ recombobulate _
home / tips / debug-faster-with-error-context
0

Debug Faster with Error Context

bagwaa @bagwaa · Mar 14, 2026 · Debugging
debug-faster-with-error-context

When you hit an error, don't describe it from memory — paste the full output. Stack traces contain file names, line numbers, and call chains that Claude can navigate directly. Your interpretation of the error often omits the detail that matters most.

The fastest workflow is the ! prefix, which runs a shell command and drops its output straight into the conversation:

! php artisan test --filter=UserTest
! npm test
! python -m pytest tests/test_api.py -v
! cargo test 2>&1

Claude sees the complete output — the assertion that failed, the file and line, the full exception chain — and can go straight to the problem without asking follow-up questions.

For log files, tail the relevant section into context:

! tail -100 storage/logs/laravel.log
! tail -100 /var/log/nginx/error.log
! journalctl -u myapp --since "5 minutes ago"

For longer outputs or when working non-interactively, pipe directly to Claude:

npm test 2>&1 | claude -p "Explain why these tests are failing and suggest fixes"
go build ./... 2>&1 | claude -p "What's causing this build error and how do I fix it?"

The key principle: give Claude the raw error output, not your interpretation of it. Every line of a stack trace is a clue — let Claude read all of them.

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

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Detect and Fix Memory Leaks in Your Node.js Application with Claude

Hand Claude your heap snapshots or server code and ask it to trace memory leaks — it spots missing event listener cleanup, unbounded caches, and stream lifecycle bugs that are easy to miss in code review.

bagwaa @bagwaa · 2 hours ago
0
Audit Your UI Components for Accessibility Issues with Claude

Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.

bagwaa @bagwaa · 2 hours ago
0
Debug API and MCP Issues with --debug

The --debug flag enables verbose logging for Claude Code, and an optional category filter like "api,mcp" lets you narrow output to exactly the subsystem you need to investigate.

bagwaa @bagwaa · 5 hours ago