ChatGPT Coding - Act as Expert Debugger
10 views

"Act as Expert" Debugger This prompt sets a clear persona and forces a structured, expert-level analysis of your code.
Prompt
"Act as a senior software engineer and expert debugger. I'm going to provide you with a piece of code that has a bug. Your task is to: Identify the bug and explain the root cause in simple terms. Provide the corrected code, using comments to highlight the specific changes you made. Explain why the corrected code works. Suggest one or two ways I could have avoided this bug in the future (e.g., better practices, linting rules). Here is the code: [...paste your code here...]"
No reviews yet
About the author
Co-founder of Prompt Magic and ThinkingDeeply.ai Career Chief Marketing Officer