💬Prompt Engineering

Debugging & Iteration

How to debug and improve your prompts.

Debugging & Iteration

How to fix issues and refine your app through better prompts.

When Something Goes Wrong

  1. 1. Be specific about the issue: "The button click does nothing" not "it's broken"
  2. 2. Describe expected vs actual: "Expected a success message, but nothing appears"
  3. 3. Include error messages: Copy any console errors you see
  4. 4. Mention what changed: "This broke after I added the form"

Debugging Prompt Templates

"The [feature] isn't working. When I [action], [what happens]. I expected [what should happen]. Here's the error: [error message]"
"Fix the [component]. It should [expected behavior] but instead it [actual behavior]."

Iteration Tips

  • One change at a time: Don't ask for 5 things at once
  • Review before continuing: Make sure each change works
  • Use "undo" liberally: Revert if something breaks
  • Save working states: Note when things are working well