Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Debug is not supported on android device #43

Closed
ryaa opened this issue Dec 29, 2016 · 1 comment
Closed

Debug is not supported on android device #43

ryaa opened this issue Dec 29, 2016 · 1 comment

Comments

@ryaa
Copy link

ryaa commented Dec 29, 2016

When the app is built and deployed on the android device using ionic run android debugging is not available. Please note that source map and debugging works fine in the browser. I also upgraded ionic-app-scripts to the latest version 0.0.48 but it did not helped

@ryaa
Copy link
Author

ryaa commented Jan 1, 2017

I managed to find out what was causing the problem and how to solve it. The problem was that when you're remote debugging on an android device, Chrome debugger cannot access the source map file on the device. The solution/fix is to include the source map inline. To do this I:

added the below to package.json in the root project directory

"config": {
"ionic_bundler": "webpack",
"ionic_source_map_type": "#inline-source-map"
},

This is to make the webpack to add source maps inline
changed tsconfig.js line
"sourceMap": true,
to
"sourceMap": false
This is to disable typescript to create source map file since this is done by webpack
After this change everything seems to be working fine

@ryaa ryaa closed this as completed Jan 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant