4 ms·
Actually the firebug add-on for Firefox does allow you to disable the 'debugger' statement at runtime, making it safe to insert anywhere in your code. Other th
by nathanstitt 14y ago
Actually the firebug add-on for Firefox does allow you to disable the 'debugger' statement at runtime, making it safe to insert anywhere in your code.
Other than that, good tip.
- artursapek 14y agoChrome Dev Tools also lets you ignore breakpoints, but I hope you're not suggesting to ship code with debugger statements?
- k3n 14y agoI don't it'll be much of a concern in a few years, though we're not there yet. Currently, Chrome will just gloss over any debugger statements unless the dev tools is open; if others happen to follow suit, then leaving a debugger statement in won't have any side-effects.
- rco8786 14y agoStill a really bad practice, IMO
- artursapek 14y agoI know, but leaving rogue debuggers after you're done using them is not good practice.
- nathanstitt 14y agoSorry if I gave that impression! What I meant to refer to was that you can insert them somewhere in a loop and then disable it once the loops ran a few times rather than having to press continue (potentially) several hundred times.
- artursapek 14y agoAh, yes. That is useful