console icon indicating copy to clipboard operation
console copied to clipboard

`console.assert` failures trigger Pause On Exception inconsistently between browsers.

Open brianloveswords opened this issue 8 years ago • 2 comments

When a console.assert fails (e.g. console.assert(1 == 2)) in some browsers it triggers Pause on Exception but in others it does not:

  • Chrome: Triggers (52.0.2743.82 (64-bit))
  • Safari: Triggers (9.1.2 (10601.7.7))
  • Firefox: Does not trigger. (49.0a2 (2016-07-27))
  • Edge: Not tested.

I don't have a computer with Windows so unfortunately I can't test Edge.

I find triggering Pause On Exception on console.assert failures to be useful behavior so I believe Firefox should align with Safari and Chrome on this.

brianloveswords avatar Jul 27 '16 21:07 brianloveswords

Part of the issue here is that pause on exception is not something web specs really deal with; it's part of debugger UI and UX, which different browsers all innovate on at their own rates and with their own decisions.

That said, maybe the spec could add a non-normative note about what developers might expect, like it does in a few other places.

Is there a Firefox bug filed asking for this feature?

domenic avatar Jul 27 '16 21:07 domenic

Safari just separated out their own Pause on Assertion Failures setting: https://webkit.org/b/139542 Web Inspector: Add toggles for debugger pauses at console.assert failures

JosephPecoraro avatar Oct 19 '16 00:10 JosephPecoraro