Open In App

Debugger Tool in Mozilla Firefox Browser

Firefox provides a debugger in the DevTools to examine the JS code of the web page to inspect or find various bugs. You can add breakpoints to control the flow of execution and inspect various variables. All developers must know how to debug their code and since the debugger is easy to use it won’t be a big task to learn.

Features of the Debugger Tool

The various features of the Debugger are:



Benefits of the Debugger Tool

The various benefits of the debugger are:

How to locate the Debugger in Firefox?

The Debugger is present in DevTools as a tab in the main toolbar. To open it, follow these steps:



Step 1: Using Firefox, visit the site where you want to use the debugger. Right-click on the site and then click Inspect from the context menu that appears.

Step 2: The DevTools will open, and there will be many tabs, and one of them will be Debugger. Click on it to open Debugger.

Opening Debugger

UI of the Debugger

The Debugger can be divided into three sections: the sources outline search pane, the code viewer, and the breakpoints pane.

UI of the Debugger

1. Sources Outline Search pane

This pane provides three tabs that are sources, outline and search.

Various tabs in the pane

Sources tab

Outline tab

Search Tab

2. Code viewer

This section views the code and provides option to format, ignore source and collapse/expand panes. You can click on line number to add breakpoint. You can right click the breakpoint to get a context menu which you can use to remove the breakpoint or disable it and you also get option to add conditional breakpoint and add log message.

Code Viewer

3. Breakpoints pane

This pane provides control buttons and multiple sub-panes or section of information about the breakpoints.

Breakpoints pane

Showing usage of the Debugger

Lets visit the GFG site and use the Debugger to inspect and debug.

Step 1: Visit the GFG site and locate the Debugger in the DevTools.

Step 2: Add the required breakpoints and use the controls to control the execution.

Using the Debugger in GFG site

The developers can inspect or debug the JS code in the browser itself using the Debugger provide by Firefox browser. The tool provides various options to make the code easier to view and add breakpoints to control the flow of execution.


Article Tags :