Hello
Starting Ionic 2 development, and love it so far! Mobile hybrid app dev has come a long way since I last had a look 2 years ago. Anyhow, I have a small problem with trying to get the debugger breakpoints working:
Problem:
Breakpoints are only being hit in www\build\js\app.bundle.js
Reproduce
- I start the emulator, run the app on the emulator (this works perfectly)
- Set some breakpoints in app folder files e.g. app/pages/list/list.js
- In VS Code>Debug Pane, I choose
Attach to running Android on Emulator
. Debugger runs and connects.
Actual Result
3. The breakpoints are not hit. They only get hit if I set them in the www\build\js\app.bundle.js
Note on Sourcemaps
In MyIonic2Project\.vscode\launch.json
, the settings for the Attach to Running on Emulator configuration are:
âsourceMapsâ: true,
âcwdâ: â${workspaceRoot}â,
âionicLiveReloadâ: false
My Setup
Itâs an Ionic 2 project, created using:
ionic start --v2 -a "My Ionic 2" MyIonic2Project tutorial
This works perfect with cli commands: on Chrome with ionic serve
, emulator using ionic emulate android
, and on the device as well (HTC One M8), so all is good up to this point
I have installed latest Visual Studio Code
, and included the Cordova
tools: ext install cordova-tools
Posted this question on StackOverflow also: