Debugging Tools for Windows
The Debugging Tools
for Windows package is a freely available support package that contains
a set of powerful debuggers and tools to help in the software
The package comes in two flavors: 32-bit and 64-bit depending on which
architecture you want to debug.
There are three user mode debuggers available in the Debugging Tools for Windows package—NTSD, CDB, and WinDbg—and one kernel mode debugger (kd).
Although these debuggers are three separate tools, it is important to
understand that they all rely on the same core debugger engine. The most
significant difference between the debuggers is that WinDbg has a graphical user interface (GUI) component, making it easier to work with when doing source level debugging. In contrast, NTSD and CDB
are purely console-based debuggers.
After choosing the flavor of
the debugger (32-bit or 64-bit), the installation process for Debugging
Tools for Windows is straightforward and the default installation
options are typically sufficient. The default installation path is
%programfiles%\Debugging Tools for Windows
Please note that at the
time of publishing the most recent version was 188.8.131.52.There should be
relatively minor changes in the debugger output. The debugger
download URL also keeps a history of prior debugger versions (going back
two or three releases) that can be downloaded. If you want to use the
exact same version, you can download the Debugging Tools for Windows
corresponding to version 184.108.40.206.
The .NET 2.0
Redistributable component constitutes the core of the .NET platform. It
contains all the fundamental runtime components that are needed for .NET
2.0 applications to run, including all framework assemblies and the
.NET runtime binaries.
distinction between framework assemblies and runtime binaries is
important as there has been quite a lot of confusion surrounding the
various .NET releases. Not counting service packs, the following
releases are currently available: 1.0, 1.1, 2.0, 3.0, and 3.5. Table 1-1 illustrates the main difference between each version.
Table 1. Currently Available Major .NET Versions
|.NET Version||Included in Windows||Architecture||Latest SP||Runtime Changes||Framework Changes|
|1.0||None||X86||3||Initial Version||Initial Version|
|1.1||Windows Server 2003||X86, x64, IA64||1||No||Yes|
|2.0||Windows Server 2003 R2||X86, x64, IA64||1||Yes||Yes|
|3.0||Windows Vista||X86, x64, ia64|| ||No||Yes (notably WPF, WCF, WF)|
|3.5||Windows Server 2008||X86, x64, ia64|| ||No||Yes|
If you are running
on an operating system where the .NET 2.0 redistributable component is
not installed, the installation process is straightforward. Simply
navigate to the installation URL and select the default installation
redistributable package enables .NET applications to run on a computer,
the .NET SDK component enables developers to create .NET applications by
all the necessary tools (compiler, assembler, build tool) and
libraries. The .NET SDK does not provide a GUI-based integrated
development environment but rather a command-line driven environment.
Prior to installing the
.NET 2.0 SDK, ensure that the .NET 2.0 Redistributable package has been
installed. To install the .NET 2.0 SDK, navigate to the download URL
and launch the setup. You will have a few options as part of the
start samples. Quick start samples are great tools when you want to get
started building .NET applications. They include small pieces of sample
code in the different .NET areas (such as ADO, interoperability, and
and Debuggers. This option installs a number of tools and debuggers.
The debugger that comes as part of the .NET 2.0 SDK is DbgClr. DbgClr is
a source-level GUI debugger with a look and feel similar to that of
Visual Studio. If you are familiar with the Visual Studio debugger,
using DbgClr will be a very similar experience.
Documentation. It is strongly recommended that you install the product
documentation as it contains a ton of information useful when developing
The last step of the installation process is to select the installation location (default is %programfiles\Microsoft.net\SDK).
Included with the .NET 2.0 SDK
is a build utility called MSBUILD. It is the same build utility that
Visual Studio utilizes and works on the basis of defining the build
process in XML format. Listing 1 shows an example of an MSBUILD project file for a simple .NET command line application written in C#.
Listing 1. MSBUILD project file for simple .NET command-line application
<Project DefaultTargets = "Compile"
<!-- Set the application name as a property -->
<!-- Specify the inputs by type and file name -->
<CSFile Include = "simple.cs"/>
<Target Name = "Compile">
<!-- Run the Visual C# compilation using input files of type CSFile -->
Sources = "@(CSFile)"
OutputAssembly = "$(appname).exe">
<!-- Set the OutputAssembly attribute of the CSC task
to the name of the executable file that is created -->
TaskParameter = "OutputAssembly"
ItemName = "EXEFile" />
<!-- Log the file name of the output file -->
<Message Text="The output file is @(EXEFile)"/>
To build an MSBUILD
project, simply invoke the MSBUILD utility and point it to the project
file (located in the same folder as source code):
Microsoft (R) Build Engine Version 2.0.50727.1434
[Microsoft .NET Framework, Version 2.0.50727.1434]
Copyright (C) Microsoft Corporation 2005. All rights reserved.
Build started 4/7/2008 10:25:36 AM.
Project "C:\MSBuild\build.xml" (default targets):
The output file is Welcome.exe
Time Elapsed 00:00:00.86