How to activate multi-line command line in Firefox DevTools?
Asked Answered
A

5

13

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.

Asyut answered 31/1, 2017 at 1:31 Comment(2)
Your screenshot actually shows the Firefox DevTools with the Firebug theme, not Firebug. See the related Mozilla blog post.Chatelaine
I've edited your question now to reflect that.Chatelaine
M
18

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.

Matsumoto answered 25/3, 2017 at 8:4 Comment(0)
O
13

Firefox Developer version(v70) has multiline console which can be activated with ctrl+b (on linux at least, I havent found the shortcut in the offical docs). So this will soon show up in mainline FF i guess.

Orthochromatic answered 10/10, 2019 at 6:49 Comment(3)
I am using Ubuntu 18.04.3 LTS and ctrl+b worked for me.Mathewmathews
this is available from Firefox v71 onwards. Simply there is a little icon in the bottom of the dev tools to switch to multiline editor.Eyot
Cmd+b on macOS also works to toggle this. Handy to know the keyboard shortcut (ctl/cmd+b) because the little icon does not appear in the multiline editor, if you want to go back to in-line.Significs
C
5

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.

Chatelaine answered 31/1, 2017 at 7:27 Comment(0)
D
1

There doesn't seem to be a modern answer, so:

To enter multi-line console mode, click the button at far right, or press Ctrl+B:

enter image description here

To go back to single-line console mode, click the cross at the top right of the editor, or press Ctrl+B:

enter image description here

Danielladanielle answered 20/6, 2023 at 0:11 Comment(0)
D
0

Hello when in firefox browser laptop/pc developer tools console or

via remote debugging firefox browser laptop/pc developer tools console

icon for x to close multi line console mode and switch to normal console mode

enter image description here

To Toggle between firefox normal console mode and multi line console mode when on console ( developer tools ) window

  • enter ctrl+b to switch from normal console mode to multi line console mode

  • enter x button when on multi line console mode to switch to normal console mode

To Toggle between firefox normal console mode and multi line console mode when on console ( developer tools ) window

  • enter ctrl+b to switch from normal console mode to multi line console mode
  • enter ctrl+b to switch from multi line console mode to normal console mode

icon for multi line console mode highlighted in red this looks like book like form to click on it so enters multi line console mode from normal console mode

enter image description here

Deviltry answered 25/1 at 14:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.