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

210
Views
Weird breakpoint in the chrome debugger

I was debugging my javascript code in the chrome console the other day and suddenly started hitting a breakpoint in some code I don't recognize. Is it possible that it is a part of the console itself and by accident there was a breakpoint created?

The thing is that this breakpoint was being hit over and over even when I was just typing in the console on a blank page with no scripts running.
Here is the code as it looks in the debugger:

(function i(t){let e;e="string"===t?new String(""):"number"===t?new Number(0):"bigint"===t?Object(BigInt(0)):"boolean"===t?new Boolean(!1):this;const s=[];try{for(let i=e;i;i=Object.getPrototypeOf(i)){if(("array"===t||"typedarray"===t)&&i===e&&i.length>9999)continue;const n={items:[],title:void 0,__proto__:null};try{"object"==typeof i&&Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor&&i.constructor.name&&(n.title=i.constructor.name)}catch(t){}s[s.length]=n;const o=Object.getOwnPropertyNames(i),r=Array.isArray(i);for(let t=0;t<o.length&&n.items.length<1e4;++t)r&&/^[0-9]/.test(o[t])||(n.items[n.items.length]=o[t])}}catch(t){}return s})

enter image description here

It looks like it's doing some type checking and returning some primitives, but it is pretty weird. Anyone got any idea what's going on?

Update:

I went through the code with the step icon in the debugger and apparently, the variable o used in the loop in the end of the code was the list of like +- 1000 JS registered names (like "String", "Promise", "URLSearchParams", "TouchList", "DeviceMotionEventAcceleration", ...). Perhaps this is a part of the autocomplete tool in the console?

about 4 years ago · Juan Pablo Isaza
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!