Solution Preparation


You can access the debug settings for your Visual Studio solution from the Solution Explorer window by right-clicking the solution and choosing the Properties menu item.

Source File Search Paths

You can find the debug settings that govern where the debugger searches for a solution's source files on the Common Properties Debug Source Files property page, as shown in Figure 4-6.

click to expand
Figure 4-6: The Debug Source Files property page

Using this page, you can specify the paths that the debugger should use when it tries to locate source files for the projects within your solution. If you're debugging your application solely within Visual Studio and with the source code already loaded, you won't have to add any path in this page. If, however, you're debugging any projects where the source code isn't readily available, such as when you're attaching to a process that's already running or when you're debugging software that wasn't created within Visual Studio, you should add every path that the debugger needs to find the solution's source files.

Symbol File Search Paths

You can find the debug settings that govern where the debugger searches for your solution's debug symbol files on the Common Properties Debug Symbol Files property page, as shown in Figure 4-7.

click to expand
Figure 4-7: The Debug Symbol Files property page

Using this page, you can specify the paths the debugger should use when it tries to find the debug symbol files (those suffixed with.pdb) for each of the projects within your solution. The same criteria apply for specifying paths as those that I just discussed with the Debug Source Files page. For more information on debug symbols and how they work, please see the "Debug Symbols Management" section later in this chapter.

Solution Build Configuration

You can find the settings that govern how your solution is built, and therefore how easily it can be debugged , on the Configuration Properties Configuration property page, as shown in Figure 4-8.

click to expand
Figure 4-8: The solution Configuration property page

As I described in Chapter 3, there are two standard configurations that you can use when building your solutions. The default Debug configuration creates a symbol file for each executable and doesn't optimize the resulting CIL or native code, whereas the default Release configuration doesn't generate symbol files and optimizes the compiled code. This page allows you to alter the behavior of each of these configurations or to create your own custom configuration. If you create a custom configuration, you should go to each project's Configuration page to define what your custom configuration represents for each project.

As an example, I always create a custom release configuration for each of my solutions. Then I go into each project in the solution and specify that for this custom release configuration, the project should be built with code optimization and with full debug symbols. This lets me create and release a production program that can be debugged in-place rather than having to go back to the debug version of the program.

The other useful setting on this page is the Build option. You should uncheck this option for each project in your solution that doesn't need to be rebuilt every time you start a debugging run. I tend to concentrate on changing just one project per session, and therefore I normally use this setting to tell the compiler not to bother with rebuilding the other projects.




Comprehensive VB .NET Debugging
Comprehensive VB .NET Debugging
ISBN: 1590590503
EAN: 2147483647
Year: 2003
Pages: 160
Authors: Mark Pearce

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net