Debugging Prompts

Use structured prompts to investigate errors, run codebase audits, handle fragile updates safely, and resolve persistent issues systematically.

Use structured prompts to investigate errors, run codebase audits, handle fragile updates safely, and resolve persistent issues systematically.

Building with AI is fast and fun—until something goes wrong. Errors, unexpected behaviors, or "the AI did something weird" moments are part of the process. This guide will help you navigate AI-based debugging workflows in Prototyper.


The Debugging Mindset

Avoid generic prompts like:

Nothing works, fix it!

Instead, be specific:

Now the screen has gone blank and I am no longer able to make edits.
Can you check what happened?

The more context you provide about what broke and when, the faster you'll get to a solution.


Quick Debugging Steps

  1. Describe the problem clearly — What did you expect? What happened instead?
  2. Share the error message — Copy the exact error from console or terminal
  3. Mention recent changes — What did you do right before it broke?
  4. Ask for explanation first — Understand the problem before applying fixes

When to Use Each Approach

SituationApproach
Simple error with clear messageAsk for explanation and fix
Complex bug with no obvious causeRequest step-by-step analysis
Performance issuesUse performance audit prompt
Structural concernsRun a codebase audit
Delicate code changesUse safe approach prompt
Persistent recurring errorsLook for root cause, consider rollback

Key Principles

Focus on Root Cause

Don't just fix symptoms. Ask "why did this happen?" to prevent the same issue from recurring.

Preserve What Works

When fixing one thing, be explicit about what should stay the same. Don't let fixes introduce new bugs.

Progressive Enhancement

Build features in small, testable increments. If something breaks, you know exactly which step caused it.

Document Your Fixes

After resolving a tough bug, ask: "Summarize what the issue was and how we fixed it." Save this for future reference.


Learn More