|
Answer» Debugging is an important element of any development process. When it comes to Ionic, We can use Chrome or Safari to debug Android and iOS applications. Android: Follow the STEPS below to debug an Android application in real-time. - On Android Mobile, ENABLE developer mode.
- ionic Cordova can be used to execute the application on a real device. Run Android or ionic Cordova build Android to build the apk and transfer it to the phone.
- Connect your device to your computer USING a USB cable, then open Google Chrome and go to chrome:/inspect/#devices to see your phone and application name. There's an inspect button there.
- You'll be able to inspect the application and look at the logs now.
iOS: To debug an iOS application in real-time, follow the steps below. - Execute the command ionic Cordova to run the application on the device. Build the application with ionic Cordova or run-ios To get the application on the phone, you'll need to build it on iOS and use Xcode.
- Now go to Safari -> Windows -> Developer Options to enable developer options.
- You may now debug the application in real-time by going to developer -> Your phone -> localhost.
|