I have been trying to debug the flow of an app. Initially I was using Webstorm debugging, but I have now reduced down to using “debugger” statements in Chrome. The problem is when it hits the breakpoint the line highlighted in chrome is incorrect it is about 5-6 lines above where it should be. So for example:
The debugger statement it has hit is (I believe) the first line in function “signup” as I just tapped “Create an Account”, but the highlighted line is in the middle of the validator above. This will continue to occur for each of the debugger statements in this code. Note: debugger in some of the other files hit the breakpoint correctly.
My research suggests that this is a mis-match between the ts file the js file and js.map file. - but how do I correct it?
I have tried deleting the .js and .js.map files and re-running Ionic Servre. As expected the .js and .js.map files get recreated, but the error persists.
I have updated everything I can - current ionic info is below.
I have built the project again in a new directory. Also ensuring it is never touched by Webstorm - thus eliminating that as a possible issue.
But the problem persists.
I don’t know what I am fighting here? Is the map file being created incorrectly by Ionic? Is Chrome reading it wrong? Can I correct the offset somehow?
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.15.0 ionic (Ionic CLI) : 3.15.0
@ionic/app-scripts : 3.0.1 Ionic Framework : ionic-angular 3.7.1
Node : v6.11.3 npm : 3.10.10 OS : macOS Sierra
backend : legacy
Chrome is Version 61.0.3163.100 (Official Build) (64-bit)