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

189
Vistas
Why does Firefox debugger stop twice at the end of some functions in Javascript?

I'm using the Firefox debugging extension in VS Code and have set a breakpoint at the last line (line 13) of the code below so that it stops before executing outer();. Then I step with F11 through the JS-Code and wonder why I have to press F11 twice at line 8 and line 11?!

function outer() {
    function inner() {
        function innermost() {
            console.log("in innermost")
        }
        console.log("in inner");
        innermost();
    } //line 8
    console.log("in outer");
    inner();
} //line 11

outer(); //line 13

The script-tag is placed on an empty static html page:

<body>
    <script src="main.js"></script>
</body>

Btw, is there a possibility to stop execution (at the breakpoint in line 13) already when the page is loading for the very first time so I don't have to reload the page in browser with F5 in order to test? How can i debug the very first loading of the page?

EDIT: The same does not happen with the Edge browser and the already integrated debugger (which doesn't need an extension for VS Code). With Edge i don't have to press F11 twice in lines 8 and 11 and i am also able to debug the first page load!

May anyone knows what's the reason for Firefox behaving like that?

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