Phantom breakpoint

My code is halting in debugger on a line which has no breakpoint set. Setting a breakpoint then removing it doesn’t help. There is no console message and I haven’t changed the code in that line recently.
I opened the page in a new tab but it still stops. It worked ok at first.

for (iTiles = 0; iTiles < arrayTemp.length - 2; iTiles++) // fncLoadData

Any ideas?
Thanks

Maybe the “Pause on exceptions” is checked ?

I have the same problem. I have lots of ghost breakpoints! I do not have pause on exceptions active neither anything else. How to remove these ghosts?

Using Windows 10, Firefox 88.0.1 (64-bit) and it is up to date. “Pause on Exceptions” under ‘Breakpoints’ is unchecked. I deleted existing breakpoints in the problem source code (none were for the offending line). I’ve closed the tab, closed Firefox and restarted. It still stops at the same nonexistent breakpoint.

This seems to be a recurrent problem over years. Frustrating, partly because I’ve not got the expertise to even begin to understand why it might happen. How does FF ‘remember’ the location across edits? (The breakpoint is in my code, a one-line anonymous click-event handler.)

My own comment led me to look at ‘Event Listener Breakpoints’. Mouse/mousemove was cheked :-(. Clearing that fixed the problem. Sorry about the false alarm. No wonder this has been plaguing me “over years”!

2022-05-26T22:00:00Z
I too seem to have a “ghost” Breakpoint that has appeared over the last couple of months.
Windows 10, Firefox Developer Edition 101.0b9 (64-bit)
I have no Breakpoints set, no XHR Breakpoints, no DOM Mutation Breakpoints and all Event Listener Breakpoints are clear.
The “Ghost” Breakpoint always pauses in a Javascript function on an ajax call.
If I check the “Scopes” entry on the debugger I see that there are three entries:

  • getdata (the function name)

  • annonymous

  • Window: Global

I have tried to find a way of clearing all breakpoints including any on “Scopes” but without success.

Hi @atvasco and thanks for the report. Persistent/invisible breakpoints are tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1754564, but they don’t all come from the same root cause.

Could you open the Browser Console, and execute the following code snippet:

(async function () {
  var loader = Cu.import("resource://devtools/shared/loader/Loader.jsm", {});
  var asyncStorage = loader.require("devtools/shared/async-storage");
  const event = await asyncStorage.getItem("debugger.event-listener-breakpoints");
  const pending = await asyncStorage.getItem("debugger.pending-breakpoints");
  const xhr = await asyncStorage.getItem("debugger.xhr-breakpoints");
  console.log(JSON.stringify({ event: event?.active, pending, xhr }, null, "  "))  
})()

It will give us a better idea of which breakpoint is persistent for you

Thanks for your response.

Attached is the result of your Browser Console snippet on a fresh instance of Firefox Developer:

@atvasco thanks! Could you copy the whole text, and add it here? The screenshot doesn’t show everything, so we can’t tell if there are any buggy XHR breakpoints.

And just for context, can you share a screenshot of your debugger when it’s paused on a “ghost” breakoint?

Thanks

Using the fresh instance of Firefox that I mentioned in my last email I then browsed to the page that was giving me “Ghost breakpoint” problems an found that the code executed with no problems, (no ghost breakpoint)!

I’m not sure what has happened. All I did was to create a fresh instance.

Could my original instance have been corrupted in some way, (I did have many tabs open).

If this problem occurs again I will come back and report it but I thank you for your help.

The attachment that I posted contained no other text on the Browser Console but I expanded the top and bottom sections and have attached it to this email.

Thanks again and let me know if I can supply any further details.

ATV

Well glad it’s fixed :slight_smile: If you created a new profile for this new “instance” then yes it should have fixed the issue, since the breakpoints are stored in the profile.

Otherwise, I don’t know what could have fixed it. Make sure to come back if the issue happens again, we’ll try to get to the bottom of it.

Regarding the text I was interested in, I meant the following part of the first screenshot:
image

The screenshot doesn’t show what is below “sourceurl”, that’s the content I was after.

You can right click on the message and use “Copy Message Content” to get the whole text content in your clipboard.

Is there a way to just clear out all breakpoints without making a whole new profile? I routinely have these phantom breakpoints show up and cause trouble. Just clearing out all breakpoints that the browser knows on all pages would let me work around it.