
What is F12 Developer Toolbar:

Using F12 Developer Toolbar:
There are a lot of uses of F12 Developer Toolbar. In this article I am going to highlight a few of them. With F12 Toolbar you can:
- Select DOM Elements
- Debug JavascriptIdentify the Javascript errors or missing HTML tag errors on your files.
- Trace the applied CSS classes.
- Analyze the Network Timing
In order to explain the above functionalities I have used the below HTML markup. It’s a simple ASPX file with a textbox and a button. The text box accepts an integer value and validates it and shows the alert box accordingly.
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="SessionDemo.Home" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <link href="Home.css" rel="stylesheet" />
- <script type="text/javascript">
- function validateAge()
- {
- var age = document.getElementById("txtAge").value;
- if(isNaN(age))
- {
- alert("You have entered valid age");
- }
- else {
- alert("You have entered invalid age");
- }
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- Enter Age:
- <input type="text" id="txtAge" />
- <input type="button" id="btnValidate" value="Validate Age" onclick="validateAge();" class="btn"/>
- </div>
- </form>
- </body>
- </html>
This is an important feature of Developer Toolbar. You can easily navigate the particular DOM elements by clicking on it on the IE so that you can easily spot the respective "piece of markup" for that element in the whole page. This facilitates easily fixing the issues related to design.
In order to select the DOM element, you need to:
- Select the Arrow mark icon (Select Element by click) on the top left in Developer toolbar.
- Now you can select any element in the page(Elements are highlighted with the rectangle boxes).
- When you select the element, soon the IE Developer toolbar will highlight the particular markup. Refer the below screen shot.
In order to debug the JS, just run the above HTML page in IE and follow the steps:
- Open F12 Toolbar
- Go to “Script” tab, where the entire markup listed.
- Place the breakpoint on the javascript. (Please refer the below screen how to set the breakpoint)
- Click on the “Start debugging” button.
- Since the Js function is triggered when you click the button. Just click the button to start the debugging.


In some case as a developer we may make some mistakes such as a typo error. As an example, refer to the below code at line 10, wrongly typed as value() instead of value (which is get the text box value). There is no such method available in JS. It will be easily identified by IE developer toolbar. The point here is, these type of Javascript related issues are easily identified by IE Developer tool bar.
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="SessionDemo.Home" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <link href="Home.css" rel="stylesheet" />
- <script type="text/javascript">
- function validateAge()
- {
- var age = document.getElementById("txtAge").value();
- if(isNaN(age))
- {
- alert("You have entered valid age");
- }
- else {
- alert("You have entered invalid age");
- }
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- Enter Age:
- <input type="text" id="txtAge" />
- <input type="button" id="btnValidate" value="Validate Age" onclick="validateAge();" class="btn"/>
- </div>
- </form>
- </body>
- </html>
In order to identify these kind of issues, you should follow the below steps:
- Render you page in IE.
- Open F12 toolbar.
- Select the “Console” tab.
- Since this JS function is called when you hit the button “Validate Age”. So just click on it.
- You can see the error messge and when you click on the hyper link detail it will point out the repective line that causes the error.

Identify missing HTML tag errors:
Most of the time we may not close the end tag of the HTML element. Most of the time it will not cause any issues luckily. In some worst cases, it will collapse all the design of your page. IE Developer tool bar is very much helpful in this case also. It will throw a warning message in the “Console” if your markup missed out anything like missing closing tag.
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="SessionDemo.Home" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <link href="Home.css" rel="stylesheet" />
- <script type="text/javascript">
- function validateAge()
- {
- var age = document.getElementById("txtAge").value();
- if(isNaN(age))
- {
- alert("You have entered valid age");
- }
- else {
- alert("You have entered invalid age");
- }
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- Enter Age:
- <input type="text" id="txtAge" />
- <span><span>
- <input type="button" id="btnValidate" value="Validate Age" onclick="validateAge();" class="btn"/>
- </div>
- </form>
- </body>
- </html>
As you see the above code is missing a closing tag in the “span” element at the line no 26. When you run the page you can see the warning message in the console like below:

In some cases, we may require the to change the applied css, in the page to achieve the exact design as per requirement we have. Normally, as a developer we render the page in browser and come to the source code and adjust the CSS classes then again go to and run the page in browser to check the changes. In these kind of scenarios, F12 developer tool bar plays a vital role to save developer’s time. With the help of F12 developer tool bar, you can edit your applied CSS classes and see the result immeditately in the browser.This feature always helps a lot in terms of saves our time.
For demo purpose, i have used a simple CSS file and included in the ASPX file.In order to edit/trace the applied CSS classes, you need to follow the below steps:
- Render you page in IE.
- Open F12 toolbar. (by press F12 toolbar)
- Select the “CSS” tab, it will list all the CSS elements used in the page.
- You can remove the applied style by uncheck the check box. Also, you can create your own rule and apply and view it the browser itself.

Analyze Network Timings:
In some scenarios, you may need to know about the network timings that took for each requests. These kinds of analysis are helpful to do performance related improvements on the browser end. In such case, the "Network" tab in the IE Developer toolbar plays a vital role. You need to follow the below steps to work with network tab:
- Render you page in IE.
- Open F12 toolbar. (by press F12 toolbar)
- Select the “Network” tab.
- Click “Start debugging” (When you click, the button text will be modified as “Stop debugging”).
- Then you need reload the page (by pressing F5). This is because whenever the page loads at that time only the files are downloaded from the server.

About Other Browsers:
I hope you enjoyed this tutorial. For beginners it will give some good idea about the IE Developer toolbar. Let me know your thoughts in the comments.

Sagar Pandurang KapPosted Dec 6, 2017, 2:06 AM
Classic Exploration. It Really helps a lot to rescue.We can actually see output by code.
Angela JonssonPosted Jun 30, 2016, 7:32 AM
Nice
Arul RPosted Mar 26, 2016, 11:06 PM
Nice share
Sibeesh VenuPosted Mar 11, 2016, 4:48 AM
Nice Share
Mohammed IbrahimPosted Mar 10, 2016, 10:19 AM
nice
Mahesh ChandPosted Mar 10, 2016, 8:39 AM
Good Francis. Like to see this kind of articles on developers tools that are useful in day to day programming.
Vipul MalhotraPosted Mar 10, 2016, 7:04 AM
nice
Vignesh ManiPosted Mar 10, 2016, 4:12 AM
Good one
Prashant VermaPosted Mar 10, 2016, 3:28 AM
Nice
Ammar ShaukatPosted Mar 10, 2016, 1:23 AM
Good