
Now we should do reverse TCP so we could attach a debugger to the Android device.Add the following entry to launch.json file in VS Code:.Install the following plugin on VS Code: Android WebView Debug.
#Ionic livereload android how to#
Here’s the guide of how to debug the Ionic/Capacitor app that’s running on Android via VS Code: I know the question is a bit general, but this is a question that many beginners (like me) face and a few-hours-googling doesn’t provide an all in one solution guide of how to do that, especially if you’re on Capacitor. Next, run either command in a terminal, based on your chosen platform: ionic cap run ios -l -external. I’ve followed the official documentation for debugging and livereload, but still the breakpoint is never hit on VS Code from Android devices.Īlso I’ve played a lot with sourceMapPathOverrides but no result.Ĭan we somehow debug the Ionic/Capacitor app that’s running on Android device using VS Code (no Chrome pls) and with LiveReload support? Adding the address: ionic cordova run android -device -l -address 192.168.1.78, it also doesn. In my current app, it suddenly stopped working. When I create a new app, livereload works. Without adding the reload param, it works.

Finally, the native-run utility is used to run your app on a device.

Then, cordova build is used to compile and prepare your app. Once we did that, we run: ionic capacitor run android -livereload. This command will first use ionic build to build web assets (or ionic serve with the -livereload option). After we install Android Studio, we install the Genymotion plugin for Android Studio. I’m new to Ionic and want to debug the Ionic app that’s running on Android device (and emulator). Hi, when i run: ionic cordova run android -device -l, I suddenly get this this error: net::ERRCONNECTIONREFUSED. Optionally specify the -livereload option to use the dev server from ionic serve for livereload functionality.
