Friday 23 September 2011

Microsoft Visual Studio 2011 Express: Debugging with the Simulator

Microsoft Visual Studio 2011 Express for windows developer preview has a great feature that allow you to debug your new metro code on an emulator of a tablet device called the "Simulator". I have been asked a enough times how to do this to write about it here. Your first thoughts would be to go to the "Debug" menu on the Visual Studio tool bar which is "not" the case.

You put Visual Studio into Simulator debug mode by clicking on the small drop down arrow next to the old green start debugging arrow as shown in the below photo:


Now that you have selected "Simulator" mode you can hit the green debug start arrow or hit F5 as usual to start debugging in the device Simulator.

Once started you will see the device Simulator open up and start windows 8 in the device and then open/run the program you are debugging in the device window. This allows you to see how your program will look on the device and interact with it.


The first time I did this I naturally chose the "X" on the right side of the Simulator to close the program and was quickly looking at this dialog:

Once you have read the dialog it is clear that you can leave the Simulator up and running. You stop debugging as usual by clicking on the debug stop button or hitting "shift+F5". The next time you start debugging the Simulator is already running which saves time loading your next debug session.

No comments:

Post a Comment