Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox debugger breakpoint not working

Tags:

When I click on a line to set a break point, the break point line gets highlighted, then the break point highlight disappears.

Other than that, Firefox developer debug has been working fine.

like image 311
iqworks Avatar asked Feb 15 '18 19:02

iqworks


People also ask

How do I add a breakpoint to debugger in Firefox?

You can set an unconditional breakpoint using the context menu (see above), or by: Clicking on the line number for the line you want to break at in the source pane. Highlighting the line you want to break at in the source pane and pressing Ctrl + B (Windows/Linux) or Cmd + B (macOS).

How do I debug JavaScript in Firefox developer?

Select “Debugger” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on Mac OSX) Press Ctrl + Shift + Z on Windows and Linux, or Cmd + Opt + Z on macOS (starting in Firefox 71; prior to Firefox 66, the letter in this shortcut was S ). Press the menu button.


2 Answers

This might help people in the future without having to modify any js file:

Have you clicked the Deactivate breakpoints button? Pressing this will toggle breakpoints on/off.

deactivate breakpoints icon

If the icon is in blue, it means the breakpoints will be de-activated.

Note: I have noticed that in some sessions the toggle is activated although not blue, a refresh of the page solved this.

like image 74
Guybrush Threepwood Avatar answered Oct 03 '22 20:10

Guybrush Threepwood


This just happened to me in Firefox 60.3.0. The tip about removing the Mozilla folder led me to a better solution, which is to edit the prefs.js file in the Mozilla profile folder. (In my system this was in C:\Users\xxx\AppData\Roaming\Mozilla\Firefox\Profiles\xxx.default)

I deleted all of the lines in prefs.js that began with

user_pref("devtools.

e.g.

user_pref("devtools.toolsidebar-height.inspector", 350);

user_pref("devtools.toolsidebar-width.inspector", 350);

This fixed the problem while preserving all my bookmarks, saved passwords, etc. The lines in prefs.js were recreated when I next ran the debugger.

like image 39
David Greenfield Avatar answered Oct 03 '22 19:10

David Greenfield