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.

Промпт

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.

Замените переменные

[SYMPTOM]

Exact error text or wrong behaviour.

[STEPS]

How to reproduce.

[CODE/FILES]

The smallest slice that contains the bug.

Какую модель использовать

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

Пример входных данных

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

Пример результата

Мы публикуем примеры результатов только из реальных запусков модели. Этот шаблон ещё не был официально протестирован, поэтому результат не показан. Запустите его самостоятельно с входными данными выше.

Почему эта структура работает

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

Распространённые сбои и исправления

It guesses without the real code.

Исправление: Paste the actual failing function and stack trace.

Известные ограничения

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

Не связано с Google и не одобрено им. Gemini, Nano Banana и Veo являются товарными знаками Google LLC.