Open In App

Sources Tool in Microsoft Edge Browser

The Sources Tool in Microsoft Edge is used to inspect and edit the JS code present on the web page. You also get debugging tools to debug the code and view the changes live on the web page. It acts as a code editor built into the browser, providing features such as formatting, color code, a file/folder navigator, etc.

 



Benefits of Sources Tool:

The various benefits of the tool are:



How to open the Sources Tool in Edge?

The Sources tool is present by default as a tab in DevTools. The DevTools can be opened in Edge using the shortcut F12 or “Ctrl+Shift+I.” Alternatively, you can right-click on the webpage and then select Inspect to open DevTools.

Opening the Sources Tool in Edge

About the UI of Sources Tool:

The tool can be separated into three sections: the navigator sidebar, the editor section, and the debugger sidebar. The sidebars can be toggled by pressing the buttons present in the top corners of the Editor section.

UI of the Sources Tool

Navigator Sidebar:

The navigator sidebar provided various panes to navigate around the files and folders.
 

Navigator Sidebar

Editor section:

This section presents the contents of the selected file. You get all the opened files in tabs, so it gets very easy to switch between the files. The presented code is color code, and at the bottom of the editor, you get the cursor’s line number, column number, and coverage information of the file. You can edit the file by right-clicking the file or the code in the edit and selecting Override Content. This will take you to the Overrides pane in the navigator sidebar.

Editor section

Debugger Sidebar:

The Debugger provides various buttons for debugging and panes providing information related to expressions and breakpoints.

Debugger Sidebar

Showing usage of Sources Tool:

Let’s visit the GFG site and view and edit its code in the Sources tab.

Step 1: Using Edge visit the GFG page and open the sources tool.

Step 2: In the tool open the file and set Override content to edit the file as you require.

Using the Sources Tool

Conclusion

To view, edit or debug the JS code of the web page you need to switch to you code editor but Edge provides a built-in code editor called Sources as a tool. The Sources tool provide navigation and debugging sidebar to navigate around the files and folder and use the debugging options to debug the code.


Article Tags :