<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>275664</bug_id>
          
          <creation_ts>2024-06-19 06:19:01 -0700</creation_ts>
          <short_desc>Auto-open DevTools for popups</short_desc>
          <delta_ts>2025-10-03 05:20:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=247660</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff Johnson">opendarwin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>karlcow</cc>
    
    <cc>rcaliman</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2042108</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2024-06-19 06:19:01 -0700</bug_when>
    <thetext>Add a new setting like Google Chrome&apos;s &quot;Auto-open DevTools for popups&quot; that automatically opens the web inspector in the new tab for window.open() and target=&quot;_blank&quot; links when the web inspector is already open.

Otherwise it&apos;s very difficult to debug page loading in the new tab, especially if there&apos;s any kind of redirect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2042126</commentid>
    <comment_count>1</comment_count>
    <who name="Razvan Caliman">rcaliman</who>
    <bug_when>2024-06-19 09:50:15 -0700</bug_when>
    <thetext>This sounds useful. It&apos;s similar to the option to automatically open Web Inspector for JS Contexts in the Safari Develop menu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2042127</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-06-19 09:50:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/130157708&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2042149</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-06-19 16:13:50 -0700</bug_when>
    <thetext>Razvan, Jeff, I believe this is a duplicate of Bug 247660</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2042151</commentid>
    <comment_count>4</comment_count>
    <who name="Jeff Johnson">opendarwin</who>
    <bug_when>2024-06-19 16:27:19 -0700</bug_when>
    <thetext>(In reply to Karl Dubost from comment #3)
&gt; Razvan, Jeff, I believe this is a duplicate of Bug 247660

They certainly seem similar, though I&apos;m not sure I understand this part: &quot;The importance is to be able to automatically continue the debugging journey.&quot;

In one practical sense, you can continue because there&apos;s now a new tab open with the web inspector that you can debug (separately). In the sense of stepping through code, however, I&apos;m not sure that you can continue?

&quot;Remote URLs won&apos;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.&quot; https://developer.mozilla.org/docs/Web/API/Window/open</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2042156</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-06-19 17:33:52 -0700</bug_when>
    <thetext>In a non-technical term. 
1. let&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2148120</commentid>
    <comment_count>6</comment_count>
    <who name="Razvan Caliman">rcaliman</who>
    <bug_when>2025-10-03 05:20:34 -0700</bug_when>
    <thetext>Karl, the two requests are independent. You&apos;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&apos;s a higher chance of getting this implemented instead of the cross-context debugging workflow.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>