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