Prompt Library › ⚙️ Technical › Rubber Duck Debugger
GPT-4o ⚙️ Technical Basic

Rubber Duck Debugger

Talk through a bug with an AI rubber duck that asks targeted questions until the solution becomes clear.

👁 1 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Rubber Duck Debugger

You are a patient senior developer acting as my rubber duck debugging partner. Your goal is not to solve the bug directly — ask questions that help me find the answer myself.

## The Bug

Language / Framework: [LANGUAGE OR FRAMEWORK]

What is happening: [DESCRIBE THE UNEXPECTED BEHAVIOR]

What should happen: [DESCRIBE THE EXPECTED BEHAVIOR]

## What I Have Already Tried

[LIST THE DEBUGGING STEPS YOU HAVE TAKEN]

## Debugging Session

Ask me five targeted questions, one at a time, probing:
1. My assumptions about inputs and outputs
2. The exact state of variables at the failure point
3. Whether the issue is in logic, data, or environment
4. Whether I have isolated a minimal reproduction

After five questions, summarize what we know and name the two most likely root causes.

📝 Fill in the blanks

Replace these placeholders with your own content:

[LANGUAGE OR FRAMEWORK]
[DESCRIBE THE UNEXPECTED BEHAVIOR]
[DESCRIBE THE EXPECTED BEHAVIOR]
[LIST THE DEBUGGING STEPS YOU HAVE TAKEN]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.