Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jan. 29, 2008(c) Mike Barnoske Introduction to Runtime Debugging Using the Visual C++ IDE COP 4331: OO Processes for SW Development © Dr. David A. Workman.

Similar presentations


Presentation on theme: "Jan. 29, 2008(c) Mike Barnoske Introduction to Runtime Debugging Using the Visual C++ IDE COP 4331: OO Processes for SW Development © Dr. David A. Workman."— Presentation transcript:

1 Jan. 29, 2008(c) Mike Barnoske Introduction to Runtime Debugging Using the Visual C++ IDE COP 4331: OO Processes for SW Development © Dr. David A. Workman Mike Barnoske School of EE and Computer Science Last Updated : January 29, 2008

2 Jan. 29, 2008(c) Mike Barnoske Introduction to Visual C++ NameVersionDate Visual C++ 66.01998 Visual C++.NET 20027.02002 Visual C++.NET 20037.12003 Visual C++ 20058.02005 Visual C++ 2008 (Beta 2)?July 2007 Recent Releases Current Versions Visual Studio 2005 Standard Visual Studio 2005 Professional Visual Studio C++ 2005 Express Edition

3 Jan. 29, 2008(c) Mike Barnoske Visual C++ 2005 Express Edition Layout

4 Jan. 29, 2008(c) Mike Barnoske Visual C++ 2005 Express Edition Layout Solution / Project Browser Class Browser Editor Output Window Call Browser Debug Windows

5 Jan. 29, 2008(c) Mike Barnoske Getting Started in Visual C++ 2005 Express Edition File->New->New Project (Shift+Control+N) Win32 Tab, Win32 Console Application Application Settings, Console Application, Empty Project Source Files Folder (In Project Browser) Add-New Item Code Tab, C++ Source File (.cpp) Add code to the Source File To Compile: F7 or Build->Build %ProjectName% To Run in the IDE: Ctrl+F5 or Debug->Start Without Debugging

6 Jan. 29, 2008(c) Mike Barnoske Files Used By Visual C++ NameDescriptionDetails $(SolutionName).slnSolutionContains List of Projects $(SolutionName).suoSolution User Options Windows Open, Window and Cursor Location, Breakpoints $(SolutionName).ncbIntellisense Database AutoComplete Information $(ProjectName).vcprojProjectMakefile-like, The.h/.cpp File List, Project Options $(ProjectName)XXX.userProject User Options User-Specific/Machine-Specific Project Options Debug\ $(ProjectName).exe Executable Debug\ $(ProjectName).pcb Debug Information Maps Source Files to Executable for Debugging

7 Jan. 29, 2008(c) Mike Barnoske Debug Information 1 : // main.cpp 2 : 3 : #include 4 : using namespace std; 5 : 6 : int f( int v ) 7 : { 8 : if (v == 0) 9 : return 1; 10 : return v * f( v – 1 ); 11 : } 12 : 13 : int main( void ) 14 : { 15 : int a = 3; 16 : cout << f( a ) << endl; 17 : return 0; 18 : } 19 : main.cpp Function int main 0x00001000 Param none Local a Type int Address 0x00001000 Source File main.cpp Line 14 0x00001000 Line 15 0x00001004 Line 16 0x00001010 Line 17 0x0000104C Function int f 0x00001100 Param v Type int Address 0x00001100 Source File main.cpp Line 7 0x00001100 Line 8 0x00001104 Line 9 0x00001108 Line 10 0x00001118 factorial.pdb. 0x1000 : 00 00 00 00 0x1004 : AB CD EF 01 0x1008 : 23 45 67 89 0x100C : AB CD EF 01 0x1010 : 23 45 67 89 0x1014 : AB CD EF 01. 0x104C : 45 67 89 AB. 0x1100 : 00 00 00 00 0x1104 : CC DD EE FF 0x1108 : 22 33 44 55 0x110C : 66 77 88 11 0x1110 : AB CD EF AB 0x1114 : BC AB 9A 89 0x1118 : 11 22 34 56. factorial.exe

8 Jan. 29, 2008(c) Mike Barnoske Hotkeys for Visual C++ Debugging NameDetails F5Start (Debugging), Continue F9Toggle Breakpoint F10Step Over F11Step Into Shift+F5Stop Debugging, End Program

9 Jan. 29, 2008(c) Mike Barnoske Web Resources for Visual C++ Debugging Video Tutorial : Getting Started with Visual C++ 2005 Express Edition http://msdn2.microsoft.com/en-us/visualc/bb530677.aspx MSDN (Debugging in Visual Studio) http://msdn2.microsoft.com/enus/library/sc65sadd(VS.80).aspx Debug Info http://www.debuginfo.com/articles/gendebuginfo.html


Download ppt "Jan. 29, 2008(c) Mike Barnoske Introduction to Runtime Debugging Using the Visual C++ IDE COP 4331: OO Processes for SW Development © Dr. David A. Workman."

Similar presentations


Ads by Google