Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!