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

188
Views
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
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!