Reputation: 407
since Chrome 80 I cannot pause the script execution when the focus is on the website I'm developing. This is extremely inconvenient e.g. when debugging hover effects.
Does anyone else experience this issue or has more information about it? Maybe a feature flag deep inside the browser settings?
Update
This was fixed in Chrome 83.
Upvotes: 20
Views: 14302
Reputation: 808
WORKAROUND
You can use option Break on -> subtree modifications
It helps me to stop script execution instead of using f8 functionality.
Steps: 1. Turn on 'Break on' for element you need to debug 2. Make some changes (hover or open drop down list as in my situation) 3. Browser will pause script execution
Upvotes: 5
Reputation: 3280
Until it is fixed, you can use the following in your app:
document.addEventListener('keydown', function (e) {
if (e.keyCode == 119) { // F8
debugger;
}
}, {
capture: true
});
Upvotes: 32
Reputation: 407
It's a bug in Chrome, I found the bugreport here:
https://bugs.chromium.org/p/chromium/issues/detail?id=1049910&q=f8&can=2
Upvotes: 4