Debugging bookmarkles in Firefox

I would like to debug bookmarklets. How can i do this? Preferably in Firefox.

There is only one line of code in bookmarks, so direct debugging is impractical.

If I create a “script” tag with the code that I send from the bookmarklet, the code from this “script” tag is not specified in Firebug scripts ... (this code works correctly, just cannot debug)

Alternatively, if you can debug code entered in the console, it will also be OK.

+5
source share
1 answer

Make a bookmarklet as follows:

javascript:document.body.appendChild(document.createElement('script')).setAttribute('src','http://localhost/test.js');void(0);

It will automatically appear in Firebug, just as easy. (Assuming you have the latest versions of Firefox and Firebug)

test.js debugger; .

: , ( , ), , , /, , .

+3

All Articles