Debug with AI

Módulo 2: Work with AI on a real codebase

Temario del curso

Esta lección aún no está en tu idioma, así que aquí la tienes en inglés.

Prueba rápida

Guess first, no penalty. Your app throws KeyError: 'user_id' in production. Which message to the AI gets the most useful answer?

A stack trace is the list of function calls that led to an error, printed with the error itself. It's the most useful thing you can paste, so paste all of it.

A good debugging request has five parts:

  • The exact error and stack trace.
  • The code involved: the function, and how it's called.
  • Expected vs actual: what should happen, and what does.
  • What you've tried, so it doesn't suggest the same thing.
  • The ask: likely causes, ranked, and how to confirm each one. Not a patch yet.

Asking for causes before a patch matters. A patch for a cause nobody confirmed can hide the symptom and leave the bug in place. So confirm the root cause first, with a test that fails for exactly that reason. Then accept a fix only when that test passes.

El resto de esta lección es parte de Learn Pro

El primer módulo de cada curso es gratis. Learn Pro abre todas las lecciones de todos los cursos por US$10 al mes. Todas las herramientas de JobRise siguen siendo gratis.