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?