When I am debugging my app in many cases it works but in other cases, especially inside of async methods, I am getting tons of cases where the breakpoint jumps around from the top of the method to some lines, instead of stepping over the async method. Also sometimes my breakpoints won't even get hit, or if they do, it break at the top of the async method, rather then the line I set. However, if I put a "debugger" line in my code, it always seems to hit and stop right on that line fine.
I am also seeing a bunch of cases where a variable that is clearly defined (and works fine in code) but when I mouse over it I receive "ReferenceError: object is not defined". Watch window doesn't work, variable doesn't show up in Variables window (some do).
I am using the mocha run option with
method to transpile, with the following .babelrc file:
"presets": ["env", "es2017"],
"plugins": ["syntax-async-functions","transform-regenerator", "transform-object-rest-spread"],
Am I doing something wrong? Why can't I use the debugger like I can everywhere else? I am using IntelliJ 2016.3.5.