Proposing a nice debugging feature

T.J. Crowder tj.crowder at farsightsoftware.com
Wed May 3 13:22:02 UTC 2017


On Wed, May 3, 2017 at 2:14 PM, somonek <somonek at gmail.com> wrote:

> The code might break or stop in some cases if it's inside
> an if block.


Why would it do that? If `debugger;` is being ignored, it'll be ignored
inside an `if` block just as well as outside it, without side-effects.

I think making `debugger` a pseudo-function is unnecessary without a
stronger motivation. The closest I can come to a motivation for this is
that if you do your own `debugif` function or similar, the condition needs
to be evaluated even if devtools isn't open, but in theory that evaluaton
could be skipped if the engine knew the condition was just for a `debugger`
statement that wasn't going to do anything. For me, that's not sufficient.

-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170503/e2c6c0c5/attachment.html>


More information about the es-discuss mailing list