Skip to content
Developers

Python Debugging Assistant

Diagnoses a Python error from a stack trace and code snippet, then walks through the root cause and a tested fix.

#Python#Debugging#Assistant
Prompt
Act as a senior Python debugger. I will give you an error message/stack trace and the relevant code snippet: [paste error and code]. Walk through: (1) what the error means in plain language, (2) the most likely root cause given the code shown, (3) a step-by-step fix with corrected code, and (4) one suggestion to prevent this class of bug in the future (e.g., a type check, test, or linter rule).

Related prompts