Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
How to debug MDN Web Docs examples?

Suppose I have Javascript example in MDN:

const object = { a: 1, b: 2, c: 3 };

for (const property in object) {
  console.log(`${property}: ${object[property]}`);
}

// expected output:
// "a: 1"
// "b: 2"
// "c: 3"

I can run it with Run button:

enter image description here

But can I trace/debug it with breakpoints with looking how it goes?

Where is the source code of this example located in developer tools in Chrome or FireFox? And/or how to unminify it?

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Where it's located: probably in a dynamic module, possibly using eval or new Function, generated immediately before its run so you won't find it before that.

Instead, you can add a debugger statement where you want a breakpoint, or just at the first line so it breaks into the right source module immediately and you can set other breakpoints in the debugger as needed.

Then open your devtools and run. Wait for it to break at the debugger statement and do your debugging.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda