Search code examples
javascriptangularjsfirebug

Firebug's Script panel displays sources like @conn0source


I have an AngularJS app and when I try to debug it in Firebug, I get all these sources with weird names in the Script panel:

List of JavaScript sources

Does anybody know what they are or how I can get rid of them?


Solution

  • Those items are dynamically evaluated scripts (introduced via eval(), new Function() or event handlers).

    These scripts don't have a URL assigned, so Firebug assigns them an arbitrary one.

    In order to assign a meaningful name or URL, the author of the web page can add a "//# sourceURL" statement.
    See http://www.softwareishard.com/blog/firebug/firebug-tip-label-dynamic-scripts-with-sourceurl-directive/ for more info on that.

    See the related documentation in the Firebug wiki.

    If you don't want to see dynamically evaluated scripts, you can disable their display by choosing Show static Scripts from the Script Type Menu.

    *Show static Scripts* option within Script Type Menu

    Note: This was also asked in the Firebug discussion group.