Reading console logs while running an emulator

Hi all,

I’ve seen many videos in which people were using both the emulator and reading console logs. I’m at lost because whne i run the emulator i don’t see any log, it’s not connected to any terminal at all. I used the devtools on browsers to read logs, or the -c parameter to read them inside the terminal.

How to run an emulator and read logs too? Here’s a screenshot of my situation.

As you can see i’m having the cordova problem but that happens because i’m livereloading, right?

EDIT: looks like i can’t log in console without running livereload (which doesn’t support cordova plugins), so how am i supposed to check logs while running on a real android emulator with cordova plugins?

This is what i mea:

C:\APOD_nasa>ionic cordova emulate android --target emulator-5554 -c

--consolelogs or --serverlogs detected, using --livereload

Why don’t you use remote debugging as well?

1 Like

I have no idea what remote debugging is, can you elaborate?

Edit: okay, found a topic with lots of info about this, didn’t know such a thing existed, thank you!

Here is my default reply to that:

Did you remote debug the problem on the device already?
Follow these instructions here to debug the problem in Safari dev tools:
https://ionic.zone/debug/remote-debug-your-app#ios
Follow these instructions here to debug the problem in Chrome dev tools:
https://ionic.zone/debug/remote-debug-your-app#android
Look at the console and network tabs for errors.

4 Likes

Thank you, even if this sounds stupid i didn’t know remote debug through chrome existed, my mind was blown.

2 Likes

Perfect - that’s why I wrote this page :wink: