Bug 275664 - Auto-open DevTools for popups
Summary: Auto-open DevTools for popups
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-06-19 06:19 PDT by Jeff Johnson
Modified: 2024-06-23 17:17 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnson 2024-06-19 06:19:01 PDT
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.
Comment 1 Razvan Caliman 2024-06-19 09:50:15 PDT
This sounds useful. It's similar to the option to automatically open Web Inspector for JS Contexts in the Safari Develop menu.
Comment 2 Radar WebKit Bug Importer 2024-06-19 09:50:34 PDT
<rdar://problem/130157708>
Comment 3 Karl Dubost 2024-06-19 16:13:50 PDT
Razvan, Jeff, I believe this is a duplicate of Bug 247660
Comment 4 Jeff Johnson 2024-06-19 16:27:19 PDT
(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
Comment 5 Karl Dubost 2024-06-19 17:33:52 PDT
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.