Open dtarnawsky opened 3 years ago
Moving the issue to ionic-cli repository.
This is something ionic-cli should handle, not Capacitor, the --consolelogs
is not a Cordova feature but an Ionic CLI feature.
Also, I've been looking into the --consolelogs
option and it only works for angular, not just because react and vue don't officially support Cordova, but because it's part of @ionic/angular-toolkit
. Also, it only works when using --livereload, which is another Ionic CLI feature, not a Capacitor feature.
Since at the moment it's a @ionic/angular-toolkit
feature, it will probably need changes in whatever we use for running react and vue apps if we want --consolelogs
to run there too and not just in angular.
I actually just opened #4740 because I observed --consolelogs
wasn't working for me in my Angular Ionic 5 / Capacitor 3 app. I guess I didn't realize this was a Cordova only feature? A little confused.
Yeah, it's a cordova and angular feature only at the moment, we have removed them from the help command and run docs for now, might try to add it in the future
Shucks, and here I got excited. Hopefully this will be added to Capacitor in the future :) Thanks for the explanation!
Feature Request
Add a --consolelogs option for "cap run" to output console statements to the terminal.
Description
Cordova has an option --consolelogs which outputs console statements to the terminal. Capacitor doesn't have this feature which means "cap run" is more difficult to quickly debug.
Platform(s)
Capacitor CLI
Alternatives
The alternative is to either open the XCode IDE and view logs there (defeating the purpose of "cap run") or open Safari and view the console via attaching to the device.