Reputation: 3839
I have not been able to get breakpoints inside popup windows to be hit by this feature, which seems to be the reason the feature was created.
I've created an online test case (I can't think of another way to do it, given that it would involve multiple files and a popup, but if someone has a suggestion, perhaps I could improve the question). Go to:
http://www.inonit.com/chromium/issue-410958/index.html
That loads an index page that has a popup window with an embedded script. If I open DevTools, enable the option, and click the button to create the popup, it does indeed open the popup with DevTools open. But now if I go and set a breakpoint in popup.js on line 2, and close the popup, and click the button to open the popup again, the breakpoint is not hit.
Is that the intent? As I read the Chromium issue and its comments, it seems as though my breakpoint should be triggered, as that seems to be a substantial portion of the motivation behind this feature.
Upvotes: 4
Views: 2565
Reputation: 16571
I'm assuming you're running Chrome with the --auto-open-devtools-for-tabs
flag.
My guess is that after opening DevTools it takes some time to re-create all the previous breakpoints.
However, event listener breakpoints seem to be created quickly enough. So you can tell Chrome to pause on the first statement of any evaluated script. If you click resume after that the previously created line breakpoint is hit.
Upvotes: 1