Firefox Developer Tools JS editor (like firebug)?

穿精又带淫゛_ 提交于 2019-11-28 08:58:41

问题


Does anybody knows if there is a way to show a javascript code editor in Firefox Developer Tools which looks like firebug's?

I find it a lot more convenient to work this way on large, complex pieces of code, where I can see the code on the right side and the result on the left.


回答1:


Firefox DevTools has something called Scratchpad which resembles the code editor of Firebug.

It's a separate window, but there's a way to have it as a panel inside DevTools too.

Additionally it supports the ability to save/open scripts, has autocompletion based on tern, pretty-printing, and can even let you execute code in Browser context (which might be useful if you're ever working on the Firefox front-end itself).




回答2:


Head over to Toolbox options (hit F12, then click on gear icon), under Default Developer Tools check the Scratchpad (this will add new tab in developer tools, like Console & ... called Scratchpad), click on Scratchpad to activate that.

As @pbrosset said, in Scratchpad you can write JS codes (it's really great) and using Ctrl+R (you need to select the code for that) or using Run button, you can run the code. the result will shown in Console tab, if you want to see Console & Scratchpad without moving to their tabs, simply hit Esc or click on Toggle split console icon.

Hope this help.

Update

Maybe you should try this add-on Console Sidebar



来源:https://stackoverflow.com/questions/41118844/firefox-developer-tools-js-editor-like-firebug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!