Remote Debugging your Hybrid Mobile app

1 min read

Debugging your Hybrid Mobile application has now become very simple, I use cordova for building Mobile applications, use to test the application in the browser once everything is ok, We will test the application in the appropriate device say Android, iPhone. In few devices the application don’t work as it worked in the browser, there may be some style issues, or some javascript error, some weird things may happen when the application runs on the actual device.

Tools for debugging

1) Weiner
2) Remote Debugging on Android with Chrome

I came across weinre tool a year back, which is really cool, we would be able to debug the application in the device just by including a simple script in the application.
Recently I came across remote debugging android apps with Google chrome browser, we don’t need to do any code changes in our application, once the application is installed in you device connect the device to you computer you will get access to you mobile application with you developer console tool really cool uahh
With weinre we would be able to run applications installed in all the devices, but we need to install weiner in our computer, but that is not in the case of chrome, you don’t need to install any extensions, google chrome browser is enough, here am going to post very simple steps to get started with both of the tools.

Weiner

Intall Weiner

sudo npm -g install weinre

Once installed you would be able to run the weinre command from you terminal

Start the Server

Winner –httpPort –boundHost

By default it runs on localhost, but, you need to use boundHost to bound your Ip Address with that, you can check http:// in the browser.

Paste the script

Paste this script in your application index file.

Thats it we are done, run the application on the device, you would be able to access the developer tool for this application at http://, you can play around with the application styles, and watch js logs

Remote Debugging on Android with Chrome

1) All you need is Chrome browser 32 or later.
2) A USB cable to connect your Android device.
I did not want to write more about this bcoz there is a very good article explaining this, Please refer remote-debugging

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *