How to activate multi-line command line in Firefox DevTools? - firefox

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.

You can try the scratchpad. Go to Settings >> Available Toolbox Buttons and check the box for scratchpad. Refer the screenshot:
Once done, you'll have a notepad-like icon in your developer console navigation bar on the right side.... Click on it and it will open a scratch pad on which you can write code and execute...
Good Luck.

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.

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.

Related

Firefox Developer Tools JS editor (like firebug)?

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.
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).
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

brackets live preview for mozilla firefox developer edition

I don't use Chrome browser. However, its very irritating that Brackets always shows live preview in Chrome. How can I set Mozilla Firefox Developer Edition as default for Bracket's live preview?
Currently using Brackets to Live Preview on Mozilla Firefox (not on the Developer Edition). I've tried Live Preview on Waterfox but I can't seem to remember if it worked or not.
Anyways, try this:
Open Brackets then on the upper part of the window, click the "Debug" button.
On its drop down menu click the "Open Preference File".
On my version of Brackets (which is the latest) it will open up two .json files: 1)defaultPreferences.json and 2) brackets.json. Just focus on "brackets.json". (If ever that the first .json file never pops-up, it's fine).
Then proceed to add this line inside the bracket:
"livedev.multibrowser": true,
I suggest putting this on top of the default lines. So for example, it would look like this:
{
"livedev.multibrowser": true,
"fonts.fontSize": "12px",
"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"themes.theme": "dark-theme"
}
Hope this helps. If it doesn't, I suggest bringing it over to the devs.
Use File->Enable Experimental Live Preview. See documentation here https://github.com/adobe/brackets/issues/12260
Open Brackets.
On the top-bar menu click on "Debug".
On the drop down click on "Open Preferences File".
It will open two files "brackets.json" and "defaultPreferences.json".
Add the following line to the "brackets.json" file.
"livedev.multibrowser": true,
Save the changes and reload Brackets.
If you wish to make Firefox your default launch browser for brackets you will have to set it as the default browser in the browser setting and vice versa to other browsers.
Happy coding :-)
If you go to Debug, Open Preferences File, Brackets says that it's a read only file. Not sure if I'm supposed to believe that or not, but I decided to. I used Windows explorer and NotePad++ to open the file directly, which can be found here:
C:\Users\<USER>\AppData\Roaming\Brackets
I added the text "livedev.multibrowser": true,, but then I had to restart Brackets for the change to take effect.
Make firefox as default browser
Open brackets goto Debug->Open Preference file
Then it will open two files ending with .json
goto brackets.json after { that is on first line write this
"livedev.multibrowser": true,
Then save it and then goto
file->enable experimental live preview
Check it
It will work...

Cloud 9 (c9.io) terminal will not allow me to enter text

I am very new to this, and my c9 terminal seems to be frozen. The cursor is blinking, but when I try to enter text, nothing shows up. I have tried exiting my workspace and reloading and it still will not work.
Opening a new terminal tab with the View menu or pressing ALT-T is the best bet to get a working terminal back (as mentioned in the comment above)... you may also find that having selected the broken terminal though, you can't click things in your menus anymore. I've found that pressing the Preview button and then closing it, seems to get the UI to be responsive again.
Supports official response is that you should perform workspace reset using ?reset=1 after your workspace url (which doesn't last or work very well in my experience).
This can happen after pressing ctrl-s, pressing ctrl-q should restore it. See https://unix.stackexchange.com/a/12108/41174 for explanation.
I tried ALT-T and ?reset=1. Nothing helped in my case.
I managed to bring my frozen terminal back to life by closing its tab. I ignored the warning that all processes would stop. Then I clicked on the rightmost tab with a plus sign. In the menu I selected "New Terminal".
You can click at the top right where CPU usage is shown. Then click on "Restart" when the menu appears.

Google Chrome dev tools automatically opens the 'drawer' pane

As of a few days ago, whenever I open the developer tools in Chrome on OSX the 'drawer' automatically opens - 2nd screen shot
The icon in blue shows/hides the drawer (now defaults to on) - First screen shot
This is so annoying and I cant figure out a way to stop this behaviour. It never did this before....
This was annoying me to no end and I could never figure out why it was automatically opening. Apparently the fix, at least in my case, is that I went into the Emulation tab inside of the drawer and disabled any of the overrides. Everything in blue is highlighted as an override. Disabling those seems to have fixed the problem for me.
Offering Phil Rykoff's comment as a solution...
Disabling JavaScript source maps seems to do the trick for me.
Settings > Enable JavaScript source maps
I was getting an error parsing my source maps so this could well be the cause for those with similar errors:
Failed to parse SourceMap: https://myapp/vendor.map
Found the solution press the "Escape" key when you're on the Developer Tools
There is also a setting under Appearance -> Show 'Emulation'/'Rendering' view in console drawer which will turn them off by default. But if you have some overrides then the panel still popup when you open Developer Tools.
In the DevTools, click the hamburger-icon.
Click 'Hide console'
Further to Ed's solution (which did fix my problem) the issue appears to be that the whatever page you are viewing is generating a console error- which in this case just happens to be a SourceMap error.
Because the default tab on the Dev Tools pane is "Elements" it appears that Chrome opens the console drawer so that the error message is visible when you reload. Rearranging the tabs in the Dev Tools so that console is the first item solves the issue, and I could re-enable SourceMap errors.

Copy to clipboard from IPython using Windows 7

I am running IPython on Windows 7 and can use the %paste magic command to paste from the clipboard. However, I cannot copy from IPython to the clipboard. I want to copy code snippets from IPython and paste them back to a text editor.
Anyone know a fix for this?
Found this gist to add a %copy magic command, my fork adds supports osx/linux/windows platforms.
I have yet to test it on windows, so please tell me if you encounter any issues.
As mentioned by #AdrianRatnapala, you can right-click in the terminal window and select Mark, mark the code snippets you want to copy, and then right-click (the marked content is copied to the clipboard when you right-click).
A more "permanent way" to use this feature is to right-click on the title bar of the terminal window and choose Properties. Under the Options tab, tick the box next to QuickEdit Mode and save this setting.
A third option is to use IPython's Qt Console. You can use this by entering ipython qtconsole in the command prompt.
A real permanent mode is to do what sodd has told, but a little bit different:
Right click in the top of the shell window, but use default instead properties option, also select options and Quick edit mode. Now this setting will survive in the next shell activations.
So it's very easy to copy and paste
Drag and drop to draw a rectangle inside shell screen and press Enter. The content is is in Clipboard. After, if you can paste this in the shell it's just press Right key or outside, use the usual Ctrl+V.
The cool thing is that you can now omit the number of commands in the copy.

Resources