The difference between Step into next function call and step in Chrome

The difference between Step into next function call and step in Chrome

two buttons

insert image description here
insert image description here

the case

debugger;
console.log('start');
new Promise(resolve=>{
    
    
    resolve()
}).then(()=>{
    
    
    console.log('inside')
});
console.log('outside');

Step into next function call running process

insert image description here
insert image description here
insert image description here
When the breakpoint reaches line 6, the code on line 8 has been output, and the breakpoint is not broken on line 8

step running process

insert image description here
insert image description here
insert image description here
insert image description here
Use stepwill first breakpoint to line 8, then breakpoint to line 6

in conclusion

Step into next function call: After the asynchronous function is executed, the code behind the asynchronous function cannot be broken. Shortcut key F11.
Step: After the asynchronous function is executed, the code behind the asynchronous function can be broken. Shortcut key F9.

Guess you like

Origin blog.csdn.net/dzdzdzd12347/article/details/131274135