Programación

Depurar código de forma metódica

Aísla la causa raíz sin adivinar.

Resultado esperado
Diagnóstico claro, fix propuesto y test de regresión.
Herramientas compatibles
ChatGPT, Claude, Copilot, Any AI
Dificultad
Intermedio
Tiempo ahorrado estimado
1 h

Personaliza tu prompt

Rellena los campos para adaptarlo a tu situación.

Vista previa

Act as a senior engineer doing a debugging pair-programming session. Reply in English.

Language / stack: {{stack}}
What I expected to happen: {{expected}}
What actually happens: {{actual}}
Full error / stack trace:
"""
{{error}}
"""
Relevant code:
"""
{{code}}
"""
What I've already tried: {{tried}}

Do this in order:
1. Restate the bug in one sentence to check we agree
2. List 5 hypotheses ranked by likelihood, with why
3. Ask me for the ONE piece of information that would separate the top 2 hypotheses
4. Once I answer, propose a minimal fix with the diff
5. Write a small regression test that would have caught this bug
6. Note anything else in the code that smells related

El contenido del prompt está en inglés. Usa la variable de idioma para elegir el idioma de la respuesta de la IA.

Consejos de uso

  • Answer the AI's clarifying question honestly — that's what turns it from a guesser into a debugger.

Errores a evitar

  • Accepting the first suggested fix without a regression test.

Prompts relacionados