0

I am using ionic DevApp (ionic v4) for the first time, i’m trying to display a json object using the function console.log(). when i run the application in ionic DevApp i see the object only displays in the commande line console (cli) not in the remote devices from google.

Please, is there anyone of you who knows how to solve this issue.

Thank you in advance.

1 Answers1

0

As far as I know, this is not possible. If you want to see the console output, add the parameter -c to the ionic serve:

ionic s -c --devapp 

this will output the console in the terminal, but you will not have it as pretty as in Chrome.

Anyway, in my experience, DevApp is not a good solution whatsoever. On one hand, you have the console issue, on the other, plugins will not work. There is no significant pro compared to see your app in the browser directly.

I think you would rather use the --livereload modifier when running the app. This will make the app to quick recompile and reload every time you save some change (just like in ionic serve). You will get the Chrome inspector, your plugins will work normally and your app will quickly recompile and reload on any change save. Just run this:

ionic cordova run android --device --livereload
elnezah
  • 425
  • 5
  • 17
  • Thank you so much. i really appreciate your answer. i just tried the second one but it isn't working, i think it's because the 'chrome remote devices' doesn't detect my Android device. do you have any idea about resolving this issue, what would be the problem ?, i really searched about it but i couldn't resolve it. thanks in advance. – Trustiser-Habiba Dec 18 '19 at 15:00
  • I'm afraid I don't know why this happens in your case For me the device appears automatically in the list as far as I: 1.- Visit chrome://inspect/#devices and check 'Discover USB devices' 2.- The device is connected via USB 3.- Developer options and USB debugging are enabled in the Android device. 4.- An Ionic app is running (or even if some web browser is running) Then I only have to click 'inspect' and a new Chrome window opens with the inspector. – elnezah Dec 19 '19 at 08:44