Why does the Chrome debugger skip over delete statements? The following code will demonstrate the observation if ran in a console.
(function () {
var foo = { bar: true };
debugger;
delete foo.bar;
})();
The answer here is in the nature of the command 'delete' its not a common function as you are used to in js. My guess is that the chrome tools are set to stop on every line that contains an object definition or an object running a method, behind the scenes almost everything one encounters in javascript is an object, however delete is not am object but an operator like '+' or '-'. And the reason it gets skipped is because this will be the only time you will have a line that doesn't throw a error but does not define or call an object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With