Saturday, October 10, 2015

Apache Cordova - debugging tools using Visual Studio

Hello everyone,

   Today I would like to show you at one of the great frameworks we have - Apache Cordova -  how to debug, emulate or run based on device using the framework in Visual Studio.

We have three classes of debug targets:

Ripple - Browser base simulator to simulate any application.

Emulators / simulators – it is based on each platform to help on Windows, IOS and Android.

Physical Devices – that speaks by itself. But giving more details is just having your device connected to your computer in order to run it there directly.

So, let's see what we have there.


Ripple example - 



Then it runs in a browser:




Emulator – Selecting IOS Simulator then IOS 6





Next step is Install MDA – remote build agent to allow the tests to be done emulating IOS screen.

So, install it running the commands provided at this link: https://www.npmjs.com/package/vs-mda-remote/tutorial


Eg:
Installing it:
sudo npm install –g vs-mda-remote –user=$USER

Creating a package.json in root:

npm init

Running the agent:

vs-mda-remote

Then when you click and play Simulator –Iphone 6 button you will see the emulator being processed to launch your IOS app using Apache Cordova.







Device – 
1-Having any device setup in your computer





2- Selecting the device option into VS Studio.




Then just run it and have fun.


Please, find more about Apache Cordova here:




I hope it helps, happy coding and talk to you soon,
Thiago Leoncio.