Provide an option to ignore debugger statements when the debugger panel is not active.

NEW
Unassigned

Status

enhancement
P3
normal
3 years ago
2 days ago

People

(Reporter: ntim, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

3 years ago
STR:
- Go to https://www.avito.ru/
- Press Ctrl+Shift+C

AR:
- mouse selection gets interrupted by debugger which pauses

ER:
- should not get interrupted (or there should be a way to disable that behaviour/the debugger)
Reporter

Comment 1

3 years ago
Chrome and Safari support both mouse selection and pausing the debugger at the same time.

Possible solutions:
- Supporting both at the same time
- Simply not pause if we're inspecting an element
- Add a way to disable debugger
- Add a way to disable pausing
See bug 1177346 about supporting mouse selection while paused at a breakpoint.
See Also: → 1177346
(In reply to Patrick Brosset <:pbro> from comment #2)
> See bug 1177346 about supporting mouse selection while paused at a
> breakpoint.

I doubt we're ever going to implement bug 1177346, due to how horrible nested event loops are in general.

Perhaps a reasonable alternative would be to provide users with an option to ignore debugger statements, even if the devtools panel is open? Patrick, what do you think?
Flags: needinfo?(pbrosset)
Priority: -- → P2
Providing users with an option for this seems a bit odd to me. I think people just assume that this works, and wouldn't really look for an option to change this behavior anyway. Also I wouldn't know where to put it in a place that they'd expect, and how to phrase it in a way to makes sense to them.

So if we're never going to be able to fix this properly, then we should avoid the situation altogether, and make it very obvious to users that we do:
- disable the debugger when the picker mode starts (i.e. the user clicks on the "element selection" button),
- re-enable it when the picker mode stops (i.e. the user has selected a node),
- display a warning banner that explains we can't pause while doing this.

We do have a banner already when you do this:
- go to the debugger
- pause execution
- go to the inspector
Flags: needinfo?(pbrosset)
I think providing a way to disable debugger statements would be useful for the debugger, regardless of this particular issue. I remember Firebug implementing something like this, and used it while debugging pages where I had been too optimistic when adding "debugger" statements everywhere (see http://www.softwareishard.com/blog/planet-mozilla/firebug-tip-disable-debugger-keyword/ )

In the use case described in comment #1, the user is automatically brought to the debugger panel, so there's no need to put this information in the inspector.
(In reply to Julian Descottes [:jdescottes] from comment #5)
> I think providing a way to disable debugger statements would be useful for
> the debugger, regardless of this particular issue. I remember Firebug
> implementing something like this, and used it while debugging pages where I
> had been too optimistic when adding "debugger" statements everywhere (see
> http://www.softwareishard.com/blog/planet-mozilla/firebug-tip-disable-
> debugger-keyword/ )
I see. This option does seem useful then.

But I still think, assuming we can't fix this properly [1], that we should just disable the debugger as soon as you start the element picker.

[1] which would mean being able to fully use the picker while paused.
Just had a discussion about this bug on irc. The consensus was that we should provide users with an option to ignore debugger statements when the debugger panel is not active.
Summary: Don't pause debugger when inspector is in picker mode → Provide an option to ignore debugger statements when the debugger panel is not active.
Firebug allowed to ignore those statements by setting a disabled breakpoint on them. There might have been a better UI for this, though.

One idea I came up with years ago[1] was to display debugger statements as breakpoints within the Breakpoints side panel.
I.e. every debugger keyword would have a corresponding entry in the side panel, which allows to disable it.

This allows to disable the debugger keywords individually and all at once via the context menu of the side panel like for normal breakpoints.
Additionally to that there may still be an option for generally ignoring all debugger statements.

Eddy, Patrick, what do you think about the possibility to disable them individually? Should this be filed separately?

Sebastian

[1] https://github.com/firebug/firebug/issues/2923#issuecomment-103408235
Blocks: firebug-gaps
Flags: needinfo?(pbrosset)
Flags: needinfo?(ejpbruel)
(In reply to Sebastian Zartner [:sebo] from comment #8)
> Eddy, Patrick, what do you think about the possibility to disable them
> individually? Should this be filed separately?
I like this idea, this sounds useful. This should be filed separately, and at https://github.com/devtools-html/debugger.html/issues
Flags: needinfo?(pbrosset)
(In reply to Patrick Brosset <:pbro> from comment #9)
> (In reply to Sebastian Zartner [:sebo] from comment #8)
> > Eddy, Patrick, what do you think about the possibility to disable them
> > individually? Should this be filed separately?
> I like this idea, this sounds useful. This should be filed separately, and
> at https://github.com/devtools-html/debugger.html/issues

Good. Filed at https://github.com/devtools-html/debugger.html/issues/828.

Sebastian
Flags: needinfo?(ejpbruel)
See Also: → 925269
No longer blocks: firebug-gaps

Updated

a year ago
Product: Firefox → DevTools
Blocks: dbg-stepping
Priority: P2 → P3
Blocks: dbg-control
No longer blocks: dbg-stepping
Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.