Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Capacitor: how to see console when running on android emulator

I am new to ionic and I want to run my app on an android emulator with hot reload and get access to the console. I use this command (i'm using capacitor): ionic capacitor run android but once the app is deployed the terminal is terminated and i don't get access to the consoleas you can see here so how can i see whatever is printed in the console? Thanks for your help P.S: I'm using VS Code, I don't know if running it in Android Studio would solve this but I don't get to do it cuz there seems the project is not detected.

like image 315
Oumaima Abou El Mawahib Avatar asked Oct 20 '25 15:10

Oumaima Abou El Mawahib


2 Answers

In Desktop Chrome you can open chrome://inspect/#devices url and your device will appear there and all the debuggable apps that are opened at the moment. Pick your app and you'll see the logs.

like image 141
jcesarmobile Avatar answered Oct 23 '25 03:10

jcesarmobile


For firefox, enter in url bar:

about:debugging

Then you'll be able to connect via usb, or enter device host:port.

See https://firefox-source-docs.mozilla.org/devtools-user/remote_debugging/firefox_for_android/index.html

like image 26
Alcalyn Avatar answered Oct 23 '25 03:10

Alcalyn