How to debug and run on your android device.

 How to debug and run on your android device.

This Process should allow you to download code from visual studio on your laptop to run on your phone essentially making the app. 

Note: This tutorial blog is based on android devices and also that Code with errors in it cannot be transferred to a mobile device!

Step One

To start you must unlock developer mode settings on your phone. Every device is different but to do this generally you enter settings an you go into about phone and click the text displaying the type of model of phone you have repeatedly. For my phone which is a xiaomi I had to click it 7 times.

Step Two

After you enable developer options go to the search bar in settings your and then type developer options, select it and scroll until you see "USB debugging" and toggle it on. Then use your phone charger lead to connect the USB end of the lead to your laptop and your phone charger end of the lead to your phone.

After establishing the mobile device is connected open a visual studio code project.

Step Three

Click the down arrow button on the run project button that says "windows machine". The expanded list of options should show "local android devices" Click the arrow pointing right on this button and it should show your mobile device.

Step Four

Finally ensure your code has no errors and click the run button with your device name on it.

Note: Ensure your mobile device is unlocked during this.

After this there may be a pop up on your phone asking to install an app "click yes" and open the app.

It will run the code your project. 

Results 

An app appears on your home screen with an icon that says .NET

Comments

Popular posts from this blog

Coding in xaml tutorial