Skip to content
AI Resource Hub

AI prompts for debugging

Copy-ready prompts for debugging. Replace the [brackets] with your own details for the best results.

Debugging

Debug an error message

Find the cause of an error and fix it, with an explanation.

I'm getting this error: ``` [paste full error message and stack trace] ``` Relevant code: ``` [paste the code around where the error happens] ``` Environment: [language version, framework, OS] What I expected: [behaviour] What I've tried: [list] Explain the most likely cause, give the fix, and explain why it works. If there are several possible causes, list them in order of likelihood with a way to check each.

How to use it

Include the full error and what you've already tried. Remove passwords and API keys from code before pasting.

Details
Debugging

Code review checklist

A structured review covering bugs, security, readability and tests.

Review this code as a senior developer. ```[language] [paste code] ``` Context: [what it's for] Organise feedback under: Bugs, Security, Performance, Readability, Tests. For each issue: severity (high/medium/low), the line or section, the problem, and the suggested fix. Finish with what's done well.

How to use it

AI reviews miss things; use them alongside human review and automated tests.

Details

More programming prompts