[Webkit-unassigned] [Bug 50432] Web Inspector: inline script blocks and injected script elements don't show "scripts" tab list

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 3 14:41:52 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=50432





--- Comment #5 from Patrick Mueller <pmuellr at yahoo.com>  2010-12-03 14:41:51 PST ---
(In reply to comment #3)
> > You can get "scripts" which otherwise are not shown in the scripts drop-down, to be shown, in Safari, by adding to your script, a comment of the form:
> > 
> >    //@sourceURL=name-of-the-script.js
> > 
> > Does not work in Chrome Dev Tools (never did, IIRC).
> > 
> 
> Wrong. Works for a year or so in Chrome DevTools.

I've pasted a test case below which works differently in Safari and Chrome.  In Safari, by the time I hit the debugger statement in "code2", "code1" is now available in the scripts drop-down.  In Chrome, it is not available in the scripts drop-down.  I tried to investigate this a long time ago (because, again, it's been happening for me for some time), but didn't get very far.  It appeared Chrome doesn't go through the same path through the Script class (implemented in JS).

I wonder if you're scanning for a different //@sourceURL= string?

    <p>lo

    <script>
    code1 = [
    '// a comment',
    'console.log("in code1")',
    '//@sourceURL=code1'
    ].join("\n")

    code2 = [
    '// a comment',
    'debugger',
    'console.log("in code2")'
    ].join("\n")


    eval(code1)
    eval(code2)
    </script>

    <p>hi

    <!--
    Google Chrome: 9.0.597.0 dev
    Safari:        5.0.3 (6533.19.4)
    -->

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list