chen
chen

Reputation: 533

how to totally ignore 'debugger' statement in chrome?

'never pause here' can not work

before

after I continue:

after

still paused

Upvotes: 53

Views: 55304

Answers (2)

John Lord
John Lord

Reputation: 2175

To stop hitting debugger statements, you must either set a "never pause here" breakpoint, OR you must pause stopping on exceptions.
This works because debugger breakpoints are considered exceptions by the browser. Uncheck "Pause on uncaught Exceptions" and your breakpoints will be skipped.

enter image description here

Upvotes: 5

Iman Bahrampour
Iman Bahrampour

Reputation: 6800

To totally ignore all breakpoints in Chrome, you must do as follows:

  1. Open your page in the Chrome browser.

  2. Press F12 or right-click on the page and select Inspect.

  3. In the Source panel, press Ctrl+F8 to deactivate all breakpoints. (or: At the top-right corner, select deactivate breakpoints.)

All breakpoints and debugger statements will be deactivated.

I tested it in Chrome 79.0.3945.88 (64-bit) and I found that the debugger statement is ignored.

Screenshot showing the effect of deactivated breakpoints on debugger statements

Upvotes: 70

Related Questions