xii Microsoft Visual Studio 2010: A Beginner’s Guide
Compiling Applications ............................................................. 129
Building Solutions/Projects ................................................... 129
Rebuilding Solutions/Projects ................................................. 130
Cleaning Solutions/Projects ................................................... 130
Managing Dependencies and Build Order . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 131
Managing Compilation Settings ............................................... 133
Navigating a Project with Class View ............................................... 136
Using the Class Designer ........................................................... 137
Class Designer Visualization .................................................. 137
Class Designer Code Generation .............................................. 138
Summary ........................................................................... 141
6 Debugging with Visual Studio ............................................. 143
Example Code for This Chapter ..................................................... 144
Development-Time Code Tools ..................................................... 148
Configuring Debug Mode ........................................................... 150
Setting Breakpoints ................................................................. 155
Creating a Breakpoint ......................................................... 156
Customizing a Breakpoint .................................................... 157
Managing Breakpoints ........................................................ 158
Stepping Through Code ............................................................. 158
Inspecting Application State ........................................................ 160
Locals and Autos Windows ................................................... 160
Watch Windows .............................................................. 161
The Immediate Window ...................................................... 162
The Call Stack Window ....................................................... 163
The Quick Watch Window .................................................... 163
Watching Variables with Pin To Source .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . . 164
Working with IntelliTrace ..................................................... 165
Solving Problems with VS Debugger ............................................... 166
A Program with Bugs ......................................................... 167
Finding the Bug .............................................................. 171
Fixing the First Bug .......................................................... 174
Debugging and Resolving NullReferenceException Problems . .. . .. .. . .. .. . .. . 175
Summary ........................................................................... 180
7 Working with Data ........................................................ 181
Working with Databases ............................................................ 182
Introduction to Server Explorer ............................................... 182
Creating a Database .......................................................... 183
Adding Tables ................................................................ 185
Relating Tables with Foreign Keys ............................................ 187
Adding Stored Procedures .................................................... 192
Configuring Database Options ................................................ 193