Give Gemini the error, the reproduction, and the relevant code, then ask for the most likely root cause, a minimal fix, and how to confirm it — before touching anything else.
Der Prompt
Here is a bug. Symptom: [SYMPTOM]. Reproduction: [STEPS]. Relevant code: [CODE/FILES]. Identify the most likely root cause with reasoning, propose the minimal fix, and tell me how to confirm it works. Do not suggest unrelated refactors. If you are unsure, list what to check next.
Ersetze die Variablen
[SYMPTOM]Exact error text or wrong behaviour.
[STEPS]How to reproduce.
[CODE/FILES]The smallest slice that contains the bug.
Welches Modell verwenden
- Gemini 3.1 Pro — Root-cause reasoning over multiple files is stronger on Pro.
Beispieleingabe
- [SYMPTOM] = "TypeError: cannot read property id of undefined on checkout".
Beispielausgabe
Wir veröffentlichen nur Beispielausgaben aus echten Modellläufen. Diese Vorlage wurde noch nicht formell getestet, daher wird keine Ausgabe angezeigt. Führe sie selbst mit der Eingabe oben aus.
Warum diese Struktur funktioniert
- Anchoring on reproduction keeps the model from guessing in the dark.
- Banning unrelated refactors keeps the diff small and reviewable.
Häufige Fehler & Lösungen
It guesses without the real code.
Lösung: Paste the actual failing function and stack trace.
Bekannte Grenzen
- Confirm the fix by reproducing the bug first, then re-running.