If you use Chrome, write in your code (where you want to break):
debugger;
Open a browser, press F12 (developer console), than refresh the page. Your application should stop running on this command.
Please note: your tslint (if you use it) may complain about using the debugger command. Edit the tslint.json file and set no-debugger to true
Vlado Tesanovic
source share