Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debugging an ionic app for android platform

I have been working with ionic and my application works fine using ionic serve.

However, as soon as I launch the apk in android, it gives white death screen and stays there.

What are the ways in which I can debug my ionic app for android platform?

I once researched a bit about debugging and got to know about chrome remote debugging.

The phone shows up in connected device and the documentation https://developer.chrome.com/devtools/docs/remote-debugging suggests to add the mentioned line of code in webview class. How do I do that? What is the equivalent of web view class in ionic?

I hear people adding it to html views they want to debug but does that suggest that I need to add it to every html page in case I need to debug all my app? It does not sound such a great solution in that case.

Can I please get some help on this?

Also, if there are other simpler ways to debug ionic app, I would really appreciate if mentioned.

Besides, I do not own android with 4.4 + ver. so would be glad to know about alternatives that support android 4.1 .

like image 720
Simran Kaur Avatar asked Feb 09 '23 05:02

Simran Kaur


1 Answers

Try to set the flag android:debuggable="true" into your AndroidManifest.xml? Or use the emulator by using ionic emulate android.

Otherwise try to run your app with ionic run --debug android.

like image 83
RWAM Avatar answered Feb 28 '23 07:02

RWAM