Skip to main content
Debug

Debug an error without shotgun changes

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.

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.

Değişkenleri değiştirin

[SYMPTOM]

Exact error text or wrong behaviour.

[STEPS]

How to reproduce.

[CODE/FILES]

The smallest slice that contains the bug.

Hangi model kullanılmalı

  • Gemini 3.1 ProRoot-cause reasoning over multiple files is stronger on Pro.

Örnek girdi

  • [SYMPTOM] = "TypeError: cannot read property id of undefined on checkout".

Örnek çıktı

Yalnızca gerçek model çalıştırmalarından elde edilen örnek çıktıları yayınlarız. Bu şablon henüz resmi olarak test edilmediğinden hiçbir çıktı gösterilmiyor. Yukarıdaki girdiyle kendiniz çalıştırın.

Bu yapı neden işe yarar

  • Anchoring on reproduction keeps the model from guessing in the dark.
  • Banning unrelated refactors keeps the diff small and reviewable.

Sık karşılaşılan hatalar ve düzeltmeler

It guesses without the real code.

Düzeltme: Paste the actual failing function and stack trace.

Bilinen sınırlamalar

  • Confirm the fix by reproducing the bug first, then re-running.

Google ile bağlantılı veya onun tarafından desteklenmiyor. Gemini, Nano Banana ve Veo, Google LLC'nin ticari markalarıdır.