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.

El 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.

Reemplaza las variables

[SYMPTOM]

Exact error text or wrong behaviour.

[STEPS]

How to reproduce.

[CODE/FILES]

The smallest slice that contains the bug.

Qué modelo usar

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

Entrada de ejemplo

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

Resultado de ejemplo

Solo publicamos resultados de ejemplo de ejecuciones reales del modelo. Esta plantilla aún no se ha probado formalmente, por lo que no se muestra ningún resultado. Ejecútala tú mismo con la entrada de arriba.

Por qué funciona esta estructura

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

Fallos comunes y soluciones

It guesses without the real code.

Solución: Paste the actual failing function and stack trace.

Limitaciones conocidas

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

No afiliado ni respaldado por Google. Gemini, Nano Banana y Veo son marcas comerciales de Google LLC.