Bug 275664
| Summary: | Auto-open DevTools for popups | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jeff Johnson <opendarwin> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | inspector-bugzilla-changes, karlcow, rcaliman, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 17 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=247660 | ||
Jeff Johnson
Add a new setting like Google Chrome's "Auto-open DevTools for popups" that automatically opens the web inspector in the new tab for window.open() and target="_blank" links when the web inspector is already open.
Otherwise it's very difficult to debug page loading in the new tab, especially if there's any kind of redirect.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Razvan Caliman
This sounds useful. It's similar to the option to automatically open Web Inspector for JS Contexts in the Safari Develop menu.
Radar WebKit Bug Importer
<rdar://problem/130157708>
Karl Dubost
Razvan, Jeff, I believe this is a duplicate of Bug 247660
Jeff Johnson
(In reply to Karl Dubost from comment #3)
> Razvan, Jeff, I believe this is a duplicate of Bug 247660
They certainly seem similar, though I'm not sure I understand this part: "The importance is to be able to automatically continue the debugging journey."
In one practical sense, you can continue because there's now a new tab open with the web inspector that you can debug (separately). In the sense of stepping through code, however, I'm not sure that you can continue?
"Remote URLs won't load immediately. When window.open() returns, the window always contains about:blank. The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously." https://developer.mozilla.org/docs/Web/API/Window/open
Karl Dubost
In a non-technical term.
1. let's say you click on a link which open a new window or tab to login to a third party
2. I want this to open automatically the web inspector in the new window
3. I want to be already in a step by step breakpoint scenario.
4. When the last step of the breakpoint is happening when the code is closing the window
5. I want to be able to continue the breakpoints as it was when I left.
I understand it is a hard problem to solve.
Razvan Caliman
Karl, the two requests are independent. You're right that following a JS debugging session across contexts is a hard problem.
But automatically opening a Web Inspector session for a popup and immediately pausing execution is solvable. There's a higher chance of getting this implemented instead of the cross-context debugging workflow.