This is a handy little tip for cases where you just can't get your debugger to start in the right context or the framework you are using doesn't give you a clear path to know when you file might be loaded. (For example ABCS, or Application Builder Cloud Service, that I am currently working on has this problem)
In this case just add the debugger statement in your javascript and voila when run in a browser the debugger is popped up.
someCode().then(value => {
debugger;
});
Always pays to read the reserved word list when learning a new language, you never know what you might find.