News for hackers. Stuff that matters.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by james33 on Wednesday May 07, 2014 @01:24PM (#7711480)
Wow, I'm really impressed with the strides Mozilla has been making on this front. Chrome has long had the best dev tools and is one of the reasons I hardly ever use Firefox anymore. Once these updates land it may be on par or even better. Excited to see true competition on the dev side of things now.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by simlevesque on Wednesday May 07, 2014 @01:25PM (#7711485)
You can use Aurora right now : http://www.mozilla.org/en-US/firefox/aurora/
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by mundanevoice on Wednesday May 07, 2014 @01:35PM (#7711557)
Same here. I still feel Firefox devtools are not innovating fast enough. Chrome workspaces and a lot of other useful features are just not present in Firefox. I feel that's one of the major reason I could never migrated to Firefox professionally. I am also quite impressed with IE 10 & 11 devtools. It is really useful and has clean UI and UX.

In short I could say that: Chrome Devtools > Firebug > IE devtools > Firefox devtools

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by mixedbit on Wednesday May 07, 2014 @02:30PM (#7711879)
I'm a long time Firefox fan, but very recently I played for the first time with IE 11 memory profiler and I must say, this is the best profiler out there.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by nitrogen on Thursday May 08, 2014 @12:33AM (#7713963)
How well does the Linux port perform?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by pjmlp on Thursday May 08, 2014 @02:14AM (#7714136)
The same way as the Safari port.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by ep103 on Wednesday May 07, 2014 @05:18PM (#7712715)
I'll use chrome devtools the day they add multiline console support. Really? In 2014, and you want me to shift-enter 200 lines of code?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by IceCreamYou on Wednesday May 07, 2014 @05:35PM (#7712782)
I got frustrated with this and created BigConsole[1] to solve it. It's a Chrome extension that adds a Firebug-style split console to DevTools.

Then I tweeted about it, and Addy Osmani responded[2] pointing out that Chrome does in fact support multiline consoles with its Snippets[3] feature. It's still kind of obnoxious, but it does the job.

[1] https://github.com/IceCreamYou/Chrome-BigConsole [2] https://twitter.com/IceCreamYou/status/354181339408375809 [3] https://developers.google.com/chrome-developer-tools/docs/au...

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by mbell on Wednesday May 07, 2014 @08:23PM (#7713343)
Why are you putting 200 lines of code into the console?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by ep103 on Thursday May 08, 2014 @12:11AM (#7713917)
I have to say, I stared at this question for a while. I have such a large reliance on using the console as a scratchpad, before ever even opening a script file, that I don't think I've even considered the possibility that one could do front end development work without it.

The best answer for you question, would be that throughout my career, the number of situations where I could directly edit a source javascript file, write-run-test-iterate in a typical software development cycle is in the far far minority of the amount of time I've spent writing javascript.

The vast majority of my time, iterating changes to javascript files is non trivial. Some examples include

Major CMS / CRM systems I've worked on where, even if I have all relevant source code, even finding the location where the page's javascript is generated or stored is non-trivial.

Major CMS / CRM solutions where making a change to a single javascript file can result in a 20 minute process before you can see those changes reflected in the browser.

Situations where I simply do not have access to the source code, but am none the less manipulating javascript on the page (for example, custom WPF applications that inject js into every page visited in the wpf web browser)

Or my current situation, where my company hosts some ~30 different web applications, and fully understanding the processes involved to get to the final page state where I will be doing my work is non-trivial.

---

But perhaps the best reason, is when debugging. With javascript, I can simply navigate to the problematic page and say module.function = myNewFunction();

If I start by copy pasting the source for the problematic code into myNewFunction in the console, then I can iterate my changes with 0 regard to how the javascript is served to the page. All my changes are instantaneous, and don't even require a refresh to see take effect. As such, my development time is usually much faster than constantly editing a source file, particularly if that backend framework doesn't update its js when noticing file changes, and is massively faster in any of the situations listed above.

But the real key is that once you get used to working in this fashion, it starts to make sense to use the console as your scratchpad to flesh out ideas before ever actually writing real production code whatsoever, in any situation. It just becomes so nice to be able to flesh out your js ideas on the fly, with 0 regard to framework, and against your target environment.

But this workflow is entirely impossible in chrome, because every time you want to run your script, you have to hit ente, and every time you need a new line you're shifting, and then you're up arrowing over versions, etc, etc. With firebug, I can just continually edit the text in the console until I'm happy with the results, and then I can keep that on the screen and use it as a reference while I write my (hopefully much nicer) real production code in a source file somewhere.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by e1g on Thursday May 08, 2014 @01:44AM (#7714093)
In Chrome, you could Snippets[1] or Live Editing[2] to monkey-patch Javascript sources inline. No need to copy & modify the content - just edit it within the browser and re-run. Complete with syntax highlighting, auto-completion, and the same no-reload goodness you are used to.

[1] https://developers.google.com/chrome-developer-tools/docs/au...

[2] https://developers.google.com/chrome-developer-tools/docs/au...

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by ep103 on Thursday May 08, 2014 @02:50AM (#7714210)
I never would have found snippits without it being pointed out to me. Thank you, that seems to be basically what I was looking for. Thought why it is there, and not just a multi-line console confounds me. Then again, so do most of Google's UI decisions for the last ~2 years or so.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by talmand on Thursday May 08, 2014 @10:31AM (#7715459)
Firefox has a feature that's actually called Scratchpad that's likely exactly what you need. It's a small, basic text editor that lets you run javascript code on the current page. It also has open and save file functionality. It can be rather handy.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by robcee on Thursday May 08, 2014 @01:55PM (#7716625)
have you tried the Scratchpad tool in Firefox (Shift-F4)? It's made for editing and executing as much JavaScript as you want.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by pjmlp on Thursday May 08, 2014 @02:15AM (#7714143)
Because some of us experienced live coding back in the day, and Chrome Dev Tools kind of feels the same way?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by kalv on Wednesday May 07, 2014 @09:52PM (#7713593)
In chrome dev tools if you have multiple lines of javascript you should take a look at 'Snippets' under the 'Sources'. It's quite a nice editor to run blocks code on the DOM when you need.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by DatBear on Wednesday May 07, 2014 @04:26PM (#7712453)
I think that Firefox has lagged behind because of Firebug. When there is already a way for developers to do things, why invent your own, unless you can make it better?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by ep103 on Thursday May 08, 2014 @02:53AM (#7714217)
I still think Firebug + WebDevelopmentToolbar + FF Web Dev Tools is the greatest combo for any browser.

Do I need to do any web dev work? Just do it in firebug.

Do I need to drastically change my browser's behaviour? There's probably a setting for that in the web dev toolbar.

Do I want to do anything that involves monitoring or changing the browser itself? check the FF web dev tools.

Between the three, I don't understand how people can claim chrome has a superior toolset.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by kyriakos on Thursday May 08, 2014 @02:57AM (#7714224)
I am still using firebug. Even though performance is not great i find its console and dom inspection to be better than chrome's and mozilla's
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by cbaleanu on Wednesday May 07, 2014 @04:14PM (#7712385)
The window title for IE 10&11 devtools is for some reason named "F12" on my windows 7 machine.

Maybe it's just me but I find this annoying, feels a little unprofessional.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by interurban on Wednesday May 07, 2014 @04:19PM (#7712420)
F12 is the default shortcut for opening the IE devtools, maybe that's why?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by mbrubeck on Wednesday May 07, 2014 @04:26PM (#7712454)
Yup, the IE devtools are named "F12" after the keyboard shortcut:

http://msdn.microsoft.com/library/ie/bg182326%28v=vs.85%29

(F12 is also the keyboard shortcut for opening the developer tools in Chrome, Firefox, and others.)

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by cbaleanu on Wednesday May 07, 2014 @04:27PM (#7712461)
By this reasoning 'paste' should be renamed to CTRL-V.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by skrebbel on Wednesday May 07, 2014 @04:46PM (#7712557)
So when Google calls a virtually chromeless browser "Chrome" it's ok, but when Micrsoft calls a tool after its shortcut key, it's stupid?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by kaeawc on Thursday May 08, 2014 @12:34AM (#7713965)
"In design terminology, ‘chrome’ refers to the non-webpage parts of the browser’s interface – the toolbars, tabs and buttons – because our design philosophy was “Content, not chrome” – putting our focus on minimizing the amount of browser UI present, we felt it cheekily appropriate to name the browser Chrome"

http://www.thewindowsclub.com/google-chrome-reason-revealed

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by hibbelig on Thursday May 08, 2014 @03:23AM (#7714273)
It's great to see humor from MS.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by givan on Wednesday May 07, 2014 @01:33PM (#7711536)
Firebug is still unbeatable, chrome dev has a lot to catch up.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by dubcanada on Wednesday May 07, 2014 @05:34PM (#7712778)
I can't stand firebug, the UI is a complete turn off for me. The Chrome dev tools (any any webkit for that matter) just look and function better for what I spend 99% of my time in dev tools doing, tweaking CSS.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by sergiosgc on Thursday May 08, 2014 @06:31AM (#7714621)
It must be a matter of preference, because I can't stand chrome dev tools' ui. Small buttons, cluttered, null use of breathing space in the design.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by tyilo on Thursday May 08, 2014 @08:20AM (#7714886)
I 100% agree with you. I don't care how good the functionality of firebug is.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by diggan on Wednesday May 07, 2014 @01:46PM (#7711618)
Long time ago I used Firebug. What do you see is better in Firebug than Chrome Devtools?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by leeoniya on Wednesday May 07, 2014 @02:30PM (#7711876)
my peeves (in order of annoyance, desc):

- inspecting ajax responses in console without flipping to net panel, then hunting for the correct request.

- keeping an inspected/selected html element highlighted on page, not just on mouseover so you can see element bounds. this is useful for tweaking sizing, padding, margins and position.

- as-i-type updating of html rather than on blur

- live highlighting html as it changes

- multiline console

- can't arrange the console tab to be first or arrange the tabs in my most frequently used order. to be fair, FB doesnt offer this either, but I like the console to be first since i spend 90% of my time there in FB, probably cause it's much more useful than chrome's.

there's more that dont immediately come to mind, but not having the first 2 is a major nuisance and productivity killer.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by thedufer on Wednesday May 07, 2014 @03:59PM (#7712322)
> multiline console

Shift-enter in the Chrome console creates a newline rather than executing.

> live highlighting html as it changes

In the Rendering tab (bottom panel) there's a toggle for "Show paint rectangles" which sounds like its close (but not quite the same) as what you're looking for.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by leeoniya on Wednesday May 07, 2014 @04:37PM (#7712519)
> Shift-enter in the Chrome console creates a newline rather than executing.

this is not only a major pain in the ass, but also much much worse than just having a persistent multiline editor window that keeps your code, cursor position and selection intact between executions.

there is simply no comparison here.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by oomkiller on Wednesday May 07, 2014 @09:23PM (#7713516)
Use snippets and just hit the run button for a near-identical experience. There is a keyboard shortcut for it too IIRC
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by smalu on Wednesday May 07, 2014 @02:40PM (#7711932)
You can enable logging XMLHttpRequests in dev tools settings (gears icon on bottom-right edge) -> console
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by leeoniya on Wednesday May 07, 2014 @03:02PM (#7712055)
it's not at all useful. all you get is some stack-tace-like thing without any of what you actually want to see. like req/resp headers and body, params, inline json/html decoding based on response type. chrome lags here by a large margin.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by clarkm on Wednesday May 07, 2014 @04:35PM (#7712500)
Just click the request from the console, and it takes you to the network tab where you can see the headers, response, etc.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by leeoniya on Wednesday May 07, 2014 @04:56PM (#7712613)
to see the response body of a request in chrome:

1. Click request in console

2. Find and click request again in Net panel

3. Click Preview or Response tab

4. Click console again to return

and then...

5. Oh wait, want to see something in the headers

6. Rinse and repeat.

In FB:

1. Click request in console.

2. See raw response body right away, or click headers to see headers or json/html to see those rendered nicely.

3. bonus: view multiple json requests in same window

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by magicalist on Wednesday May 07, 2014 @05:40PM (#7712811)
It's actually more like

1. Click request in console

2. Click on the request that was just highlighted for you in the Net panel

3. See headers right away, or click Response to see raw response or Preview to see those rendered nicely

4. Click console again to return

and then...

5. Oh wait, want to see something in the headers

6. Go to the Net panel, still there for you

It's a different workflow and it's probably annoying to you since you're not used to it, but "it's not at all useful" is edging past hyperbolic. Personally I feel like a clumsy idiot when I go back to Firebug, even though I used to live in it and once knew every quirk. I think that's just the way of developer tools.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by jkrems on Wednesday May 07, 2014 @11:29PM (#7713811)
I rarely need the console tab in the chrome devtools because hitting Esc is normally way faster. Also having the tabs in a defined order allows you to use Cmd+n to switch between them (and the number stays the same).
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by johnward on Wednesday May 07, 2014 @02:24PM (#7711844)
I think the chrome devs did a good job of incorporating the best firebug features. The things that I find better in Firebug are mostly add-ons. For example I work with xpath a lot so firepath work awesome and ties into firebug seamlessly. I haven't found a tool that works as well on chrome.

I also wonder why Mozilla didn't attempt to acquire firebug instead of building their own tools from scratch?

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by fournm on Wednesday May 07, 2014 @03:42PM (#7712255)
I believe Mozilla does manage Firebug, but the reason it isn't integrated as the main set of tools has to do with Firebug being much slower on complex pages?
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by conradfr on Thursday May 08, 2014 @09:53AM (#7715240)
Ironically I don't get console log in Firebug anymore since FF 29 (conflicts with other plugins it seems ?), so that forces me to use the dev tools.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by mixedbit on Wednesday May 07, 2014 @02:32PM (#7711888)
Mozilla maintains firebug.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by rhizome on Wednesday May 07, 2014 @06:29PM (#7712996)
Chrome adamantly refuses to un-enable responsive useragent stuff. I constantly have to turn off the extra half-window. More evidence that Google has little product sense.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by grrowl on Wednesday May 07, 2014 @07:00PM (#7713097)
I agree, while Chrome DevTools are superior in many ways, it's become a shambles as they shoehorn features wherever they fit (like that console half-window)
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by angersock on Wednesday May 07, 2014 @01:36PM (#7711563)
This is probably a really dumb question, but is there any way to get Firefox to limit console output to just the current window? I've had a tab open (Grooveshark, in this case) leak messages over into what I'm actually trying to debug, and it's pretty annoying.
Re:Firefox Developer Tools – Editable box model, Sublime Tex... by Spittie on Wednesday May 07, 2014 @01:53PM (#7711661)
As far as I know, the console embedded in the page (ctrl+shift+k) show events only from that page, while the browser console (ctrl+shift+j) show events from all the tabs.

I don't know if there is a way to decide which tabs get logged in the browser console.

Re:Firefox Developer Tools – Editable box model, Sublime Tex... by dpcan on Wednesday May 07, 2014 @05:36PM (#7712788)
Arrrg.

I use Chrome for everything but I don't like dev tools and consistently use Firefox because it works so much better for me.

I've been fearing for a long time now that Mozilla would just start doing whatever Chrome is doing.

When it comes to updating dev tools, I wish everything new were an option. When you change a "tool" you change how I "work", and bumps in my work flow just slow me down.