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.

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

Substitua as variáveis

[SYMPTOM]

Exact error text or wrong behaviour.

[STEPS]

How to reproduce.

[CODE/FILES]

The smallest slice that contains the bug.

Que modelo utilizar

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

Dados de entrada de exemplo

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

Resultado de exemplo

Só publicamos resultados de exemplo provenientes de execuções reais dos modelos. Este modelo ainda não foi formalmente testado, pelo que não é apresentado nenhum resultado. Execute-o você mesmo com os dados de entrada acima.

Por que esta estrutura funciona

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

Falhas comuns e correções

It guesses without the real code.

Correção: Paste the actual failing function and stack trace.

Limitações conhecidas

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

Sem afiliação ou aprovação por parte da Google. Gemini, Nano Banana e Veo são marcas registadas da Google LLC.