Menelaos
Menelaos

Reputation: 25727

Ignore debugger; statement but still evaluate my own breakpoints in dev-tools/IDE

Introduction

So really annoying thing is that a colleague has a habit of committing his breakpoints as debugger; directly into the sourcecode.

It's annoying because you either have to disable all breakpoints, or you have to suffer through their debug statements in order to use your own.

Question

So, what process do you guys have to work around this? I have thought of three different options (next).

My current options

I'm going to add my options here since they are also a valid answer. Looking forward however to other people's answers as well.

  1. Add conditional breakpoints in debug tools evaluating to false.
  2. Instead of calling debugger; wrap this in a custom function. Put an if statement inside with a flag true/false so that you can disable them in one shot.
  3. Remove debugger statements during source file processing in gulp.

Upvotes: 1

Views: 229

Answers (1)

Menelaos
Menelaos

Reputation: 25727

I'm going to add my options here since they are also a valid answer. Looking forward however to other people's answers as well.

  1. Add conditional breakpoints in debug tools evaluating to false.
  2. Instead of calling debugger; wrap this in a custom function. Put an if statement inside with a flag true/false so that you can disable them in one shot.
  3. Remove debugger statements during source file processing in gulp.

Upvotes: 1

Related Questions