Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Why do browsers include developer tools?
3 points by vghaisas 5 days ago | hide | past | web | favorite | 7 comments
This is a question a friend asked me a few years ago and I never found a satisfactory answer. As a developer, sure, I love the fact that browsers have developer tools included. But how did we get to this state? There must be a story here.

The vast majority of browser users aren't going to use the developer tools and aren't even expected to. And it's not like a toolbox included with some furniture because you don't expect the average user to "fix" a web page or build one themselves.

Is it just that someone did it and then everyone else thought they might as well do it too? I remember Firebug being more useful than whatever Firefox included, but it still included something iirc? Is it that it's just easier to keep them bundled in than to offer something separately and then deal with add-on problems (permissions, distribution, etc.) Is it that binary size isn't a big deal, so why not just keep it included? Even Firefox and Chrome on Android have a "view-source:" option, complete with syntax highlighting (for HTML at least).

Would love to hear what information HN has (or can find)!

I think it's part of a tradition that began with the earliest browsers including a "View Source" feature. I have not been able to use WorldWideWeb yet, but I know that Mosaic did.

It's been a huge part of what made the Web successful, because you could always see the source and copy it.

For today's pages, View Source is probably not enough for figuring out what's going on inside a page, you need the whole Dev Tools kitchen sink.

So to answer your question: tradition.

Sadly, newer platforms (iOS, Android) have largely done away with this. I know that in Chrome you can manually prepend view-source: to the URL, but that is neither accessible, nor discoverable.

To encourage people to build websites/webapps? I mean, browser manufacturers wouldn't exactly be better off if everyone moved to building mobile apps or desktop programs, so they've got at least some sort of incentive in getting people into web development.

Why do you think MDN exists?

Aside from that:

1. Web developers are power users, and the kinds who encourage others to choose a certain browser over another one. Having the best developer tools/console might encourage them to recommend your browser over a competitor's one.

2. They make web development in general a lot easier, and testing a lot more practical. Automated testing can only go so far, and they provide a place for devs to 'test out' ideas before properly coding them.

3. Because its a tradition as mentioned before, which started with view source. Now view source alone isn't good enough to understand how a page works, dev tools are very important.

The first browser tools were a Firefox plugin called Firebug in 2005. It revolutionized debugging in the browser. At that time browsers did not provide a stack trace to errors. Error messaging was obscure and not helpful so you really had to guess your way through debugging.

Firebug also allowed live adjustments to CSS, which did not exist before.

That’s the back story.

Sorry, OOT, I think you have posted the same question before in https://news.ycombinator.com/item?id=23671196. That question gets more attention (the point) than this submission.

If dang reads this, I hope this submission will be merged.

What would be the benefits of not having them included? It’s not like they get in the way of the non dev, I’m guessing most people will have no idea they are even there.

Until they fat finger F12!

Yeah, I would be okay if there was a setting to enable developer mode. I’ve seen people accidentally open up dev tools and not know what happened.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact