How to activate multi-line command line in Firefox

2019-04-06 17:27发布

Firefox DevTools console

How to make the console of the Firefox DevTools multi-line? I am aware of the Shift+Enter keyboard shortcut, which makes the command line go to the next line. Though like in Firebug, I want to vertically separate my console into command line and results part, but I can not find that functionality.

2条回答
何必那么认真
2楼-- · 2019-04-06 17:30

You can try the scratchpad. Go to Settings >> Available Toolbox Buttons and check the box for scratchpad. Refer the screenshot:

enter image description here

Once done, you'll have a notepad-like icon in your developer console navigation bar on the right side...enter image description here. Click on it and it will open a scratch pad on which you can write code and execute...

enter image description here

Good Luck.

查看更多
Deceive 欺骗
3楼-- · 2019-04-06 17:30

The command line the Firefox DevTools has a "smart multi-line" feature. That means it detects when a command is not finished and automatically inserts a line break, e.g. when you write document. and hit Enter. As you mentioned, you can also insert a line break manually by pressing Shift+Enter.

The DevTools also offer a completely separate command editor panel called Scratchpad, which you can enable via the settings (under the Default Developer Tools* section).

There is currently no multi-line editor as a side panel like Firebug's Command Editor, but it is already requested.

This is also described in the migration guide for Firebug users.

查看更多
登录 后发表回答