How to disable debugger stops on ExpressionChangedAfterItHasBeenCheckedError on development mode in Angular 9

Viewed 1142

The error "ExpressionChangedAfterItHasBeenCheckedError" is a common console error when an expression changes after it was checked in the view (common when using observables) , on Angular development environments. In angular 9, an "anoying" debugger stops occurs in this situation, pausing the execution:

Debugger paused

In previous angular versions, this error was showed in console.error but the page flows was not interrupted.

The issue was reported here: https://github.com/angular/angular/issues/35470

Meanwhile, as a workaround I suggest to modify "core.js" (@angular/core/ivy_ngcc/fesm2015/core.js), and comment the following line (~8072):

debugger; // Left intentionally for better debugger experience.

Please let me know if there is a better solution.

1 Answers

Probably a better solution (as it doesn't involve editing the file) would be to right-click the line where the break happens and then select the option "Never pause here": 'Never pause here' option

Related