For other compiler options refer .Net framework SDK documentation.
Debugging is the most important feature of any programming language and Visual Studio
.NET IDE provides this feature in an effective manner (but you can still do pretty good
job with the .NET SDK alone). Application source code goes through two distinct steps
before a user can run it. First, the source code is compiled to Microsoft Intermediate
Language (MSIL) code using a .NET compiler. Then, at runtime, the MSIL code is
compiled to native code. When we debug a .NET application, this process works in
reverse. The debugger first maps the native code to the MSIL code. The MSIL code is
then mapped back to the source code using the programmer's database (PDB) file. In
order to debug an application, these two mappings must be available to the .NET runtime
To accomplish the mapping between the source code and the MSIL, use
the/debug:pdbonly compiler switch to create the PDB file (Note: When building
ASP.NET applications, specify the compilation setting debug="true" in the application’s
Web.config file). The second mapping between the MSIL code and native code is
accomplished by setting the JITTracking attribute in our assembly. By specifying the
/debug compiler switch, the PDB file is created and the JITTracking attribute is enabled.
When using this compiler switch, a debugger can be attached to an application loaded
outside of the debugger.
Once the required mappings exist, there are several means by which to debug our
applications. We can use the integrated debugger within Visual Studio .NET, or, if we
prefer, we can use DbgClr, a GUI-based debugger. There is also a command line
debugger, CorDBG that is included in the .NET Framework SDK.
3.4 Managed Vs. Unmanaged Methods/Transitions
In .Net Framework CLR provides execution of instruction targeted for CLR and the
instructions that are not targeted for CLR. The instructions targeted for CLR are called as
managed code and other type of code is called unmanaged code. After going through this
topic you will know the following things mentioned below
Difference between Managed Method and Unmanaged Method.
Difference between Managed Type and Unmanaged Type.
How to call unmanaged methods in managed methods.
How to use unmanaged types.