Hello World Program In Visual Studio and Debugging by Anand George
Steps Visual Studio Express Installation New project Creation. http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express New project Creation. Creating program Compile Run. Debug the created application.
Demo
Debugging Freezing the execution of the program and looking at the variables and memory in general. Will be able to execute the program line by line an see the state changes of variable ( memory ) while each line is executed. Also can be used to understand the flow of a complicated program. Even to reverse engineer a program which don’t have source code.
Debugging (cont) Strongly recommended that we use a good debugger like Windbg, Visual Studio integrated debugger or gdb ( linux ) from the day1 of your programming. Help the better understanding of language aspects like pointers, functions etc. Also a very important tool for white box testing to check the states and flow of logic. As useful as the OS, complier itself when it comes to programming.
Break Point Defines when and where to freeze the program. Normally F9 key in visual studio will give a code access break point. Very useful in fixing and understanding flow of the application .
Debugging with Visual Studio Watch window shows the variable values. F9 to break point. Call stack window. Memory Window. Disassembly window.
Debugging with Visual Studio App - Find the sum of the elements in an array of 10 elements. Develop, build run and debug the application.
Thank you