← Prompting Templates

Debug This Code

Find the cause of a bug.

# Debug This Code

**Prompt**

> Here is code and the error: [paste]. First explain what the code is supposed to do, then identify the most likely cause, then give the minimal fix. List two other possible causes if the fix does not work.

**Fill in**

- Code
- Error message
- Language and version

**Tips**

- Include what you already tried
- Ask for a test that proves the fix