Water Cooler v2
Water Cooler v2

Reputation: 33850

How do I debug JavaScript written in Scratchpad that comes with Firefox Developer Tools?

I want a stand-alone editor and debugger, basically an IDE for JavaScript. I am presently using a mix of just running stand-alone scripts on the command line and editing them in Notepad++, and sometimes the Scratchpad that comes in Firefox Developer tools.

But the Debugger in Firefox Developer Tools does not show me the sources from ScratchPad. How do I make it show them?

Besides, I am unable to set breakpoints in the ScratchPad editor.

Upvotes: 2

Views: 800

Answers (2)

tqwhite
tqwhite

Reputation: 880

Scratchpad works great except I can't figure out how to access the breakpoint scope in it. Anyone have an idea how to do that? Was automatic in Firebug.

Upvotes: 0

monk-time
monk-time

Reputation: 2262

This issue was fixed in Firefox 47 (see bug 1252077), you can now use debugger; statements in your Scratchpad code or set breakpoints directly in the Debugger. The Scratchpad script's source should appear there after you have run the script at least once. Make sure you have Dev Tools open.

It's a bit awkward though since Scratchpad scripts don't update in the Debugger window after they were modified in the Scratchpad, you need to refresh the page you're on first or use ExecuteReload and Run in the Scratchpad.

Upvotes: 5

Related Questions