New issue
Advanced search Search tips

Issue 801975 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

During page refresh, breakpoints do not work in OnUnload or BeforeUnload event handler code

Reported by orlando....@gmail.com, Jan 15 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. (JS) Attach an event handler function to the OnUnload or BeforeUnload events.
2. Place a breakpoint in those event handler function code.
3. Press F5 or refresh button in the page.

What is the expected behavior?
It executes some code, stops in the breakpoint.

What went wrong?
It did not stoped in the breakpoint and instead finalized the code execution and did the refresh.

Did this work before? N/A 

Chrome version: 63.0.3239.132  Channel: stable
OS Version: 10.0
Flash Version: 

(If you, instead of a refresh, just close the tab, the breakpoint works correctly)
 
Labels: Needs-Triage-M63

Comment 2 by kozy@chromium.org, Jan 15 2018

Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Could you provide sample page?
I would feel embarrased if I am a paid coder asking a third one for a basic code example to test your own app.

Here you are.

(BTW, the devtools have too many bugs and annoyances, but it is a luck for google that firefox devtools are much much worse) (It is a pity we do not have firebug).


closingEventCode.html
540 bytes View Download
The capture
fallo chrome.PNG
118 KB View Download

Comment 5 by kozy@chromium.org, Jan 17 2018

Thanks for repro. It is actually feature. As soon as you pressed reload we ignore all breakpoints before page reloaded. It is useful all the time when you have a lot of breakpoints and need to reload page to restart debugging session.

Workaround: instead of pressing reload button you can navigate to the same url using omnibox then all breakpoint will work as expected.
If that is the case you should notificate it in the GUI and give us an alternative way to refresh with breakpoints. Maybe a checkbox.
Is going to be a fix for this bug?

Sign in to add a comment