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

208
Vistas
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
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