You can execute applications in two ways: with debugging enabled or without debugging enabled. By default, when you execute an application from VS or VCE, it executes with debugging enabled. This happens, for example, when you press F5 or click the green Play arrow in the toolbar. To execute an application without debugging enabled, choose Debug -> Start Without Debugging.
Both Visual Studio and Visual Studio Express allow you to build applications in two configurations: Debug (the default) and Release . (In fact, you can define additional configurations, but that ’ s an advanced technique not covered here.) You can switch between these configurations using the Solution Configurations drop - down in the
Standard toolbar.
In Visual Studio Express this drop - down list is inactive by default. Enable it by selecting Tools -> Options. In the Options dialog, ensure that Show All Settings is selected, choose the General subcategory of the Projects and Solutions category, and enable the Show Advanced Build Configurations option.
When you build an application in debug configuration and execute it in Debug mode, more is going on than the execution of your code. Debug builds maintain symbolic information about your application, so that the IDE knows exactly what is happening as each line of code is executed. Symbolic information means keeping track of, for example, the names of variables used in uncompiled code, so they can be matched to the values in the compiled machine code application, which won ’ t contain such human - readable information. This information is contained in . pdb files, which you may have seen in your computer ’ s Debug directories. This enables you to perform many useful operations:
• Outputting debugging information to the IDE.
• Looking at (and editing) the values of variables in scope during application execution.
• Pausing and restarting program execution.
• Automatically halting execution at certain points in the code.
• Stepping through program execution one line at a time.
• Monitoring changes in variable content during application execution.
• Modifying variable content at runtime.
• Performing test calls of functions.
In the release configuration, application code is optimized, and you cannot perform these operations. However, release builds also run faster, and when you have finished developing an application you will typically supply users with release builds because they won ’ t require the symbolic information that debug builds include.
The debugging techniques you can use to identify and fix areas of code that don’t work as expected, a process known as debugging. The techniques are grouped into two sections according to how they are used. In general, debugging is performed either by interrupting program execution or by making notes for later analysis. In Visual Studio and Visual Studio Express terms, an application is either running or is in Break mode — that is, normal execution is halted. You’ll look at the Nonbreak mode (runtime or normal) techniques first.
Source of Information : Wrox Beginning Microsoft Visual C Sharp 2008
Both Visual Studio and Visual Studio Express allow you to build applications in two configurations: Debug (the default) and Release . (In fact, you can define additional configurations, but that ’ s an advanced technique not covered here.) You can switch between these configurations using the Solution Configurations drop - down in the
Standard toolbar.
In Visual Studio Express this drop - down list is inactive by default. Enable it by selecting Tools -> Options. In the Options dialog, ensure that Show All Settings is selected, choose the General subcategory of the Projects and Solutions category, and enable the Show Advanced Build Configurations option.
When you build an application in debug configuration and execute it in Debug mode, more is going on than the execution of your code. Debug builds maintain symbolic information about your application, so that the IDE knows exactly what is happening as each line of code is executed. Symbolic information means keeping track of, for example, the names of variables used in uncompiled code, so they can be matched to the values in the compiled machine code application, which won ’ t contain such human - readable information. This information is contained in . pdb files, which you may have seen in your computer ’ s Debug directories. This enables you to perform many useful operations:
• Outputting debugging information to the IDE.
• Looking at (and editing) the values of variables in scope during application execution.
• Pausing and restarting program execution.
• Automatically halting execution at certain points in the code.
• Stepping through program execution one line at a time.
• Monitoring changes in variable content during application execution.
• Modifying variable content at runtime.
• Performing test calls of functions.
In the release configuration, application code is optimized, and you cannot perform these operations. However, release builds also run faster, and when you have finished developing an application you will typically supply users with release builds because they won ’ t require the symbolic information that debug builds include.
The debugging techniques you can use to identify and fix areas of code that don’t work as expected, a process known as debugging. The techniques are grouped into two sections according to how they are used. In general, debugging is performed either by interrupting program execution or by making notes for later analysis. In Visual Studio and Visual Studio Express terms, an application is either running or is in Break mode — that is, normal execution is halted. You’ll look at the Nonbreak mode (runtime or normal) techniques first.
Source of Information : Wrox Beginning Microsoft Visual C Sharp 2008
|
0 comments
Post a Comment