When you have a bug that makes no sense, use this prompt to force AI into a deep analytical mode.
The Prompt:
“I have a bug in my [Language] code: [Paste Code]. It produces [Error/Behavior].
Act as a Senior Debugger.
1. Walk through the code line-by-line and explain the state of variables.
2. Identify potential race conditions or memory leaks.
3. Propose a fix and explain why the original logic failed.”
“I have a bug in my [Language] code: [Paste Code]. It produces [Error/Behavior].
Act as a Senior Debugger.
1. Walk through the code line-by-line and explain the state of variables.
2. Identify potential race conditions or memory leaks.
3. Propose a fix and explain why the original logic failed.”
