programming4us
programming4us
ENTERPRISE

NET Debugging : Visual Studio (part 1) - SOS Integration

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Visual Studio is an extremely popular integrated developer environment among developers. The power of this IDE coupled with its ease of use makes it the environment of choice for .NET developers today. As part of the Visual Studio integrated experience comes a highly sophisticated debugger that can be used to perform troubleshooting on a myriad of different problems, such as using source-level debugging, script debugging, and SQL debugging. The one area where Visual Studio debugging has lacked functionality is in production-level debugging where we either need to work with post mortem dump files or have access to the internals of the CLR (such as the SOS commands). Fortunately, the Visual Studio team recognized and addressed the latter part of the problem by making Visual Studio compatible with the SOS debugger extension.

1. SOS Integration

To illustrate how the SOS debugger extension can be integrated into Visual Studio, start by creating a simple C# project (command-line application will suffice). After the project has been created, set a breakpoint on the first line of code and start debugging by pressing F5. Figure 1 shows the debugger after the breakpoint has been hit.

Figure 1. Breakpoint hit in Visual Studio

The next step in the SOS integration process is to bring up the intermediate window. The intermediate window is used to execute various commands (such as variable assignments, expression evaluations, etc.) during a debugging session. Figure 2 shows how to enable the Immediate Window.

Figure 2. Enabling the Immediate Window

After the Immediate Window has been enabled, you can begin entering debugging commands. One of the commands available at our disposal is the load command, which can be used to load the SOS debugger extension. Figure 3 illustrates the result of executing the load command.

Figure 3. Using the load command to load the SOS debugger extension

The net result of using the load command is that Visual Studio fails by stating that unmanaged debugging support must be enabled for the project. Figure 4 illustrates the process of enabling unmanaged debugging support.

Figure 4. Enabling unmanaged debugging support

Start by right-clicking the project in Solution Explorer followed by selecting the Properties context menu item, which brings up the properties page on the right side. In the properties page, select the Debug tab and check the Enable Unmanaged Code Debugging checkbox.

After unmanaged code debugging has been enabled, you can restart the debugging session, issue the load SOS command, and start using the SOS debugger extension commands in the Immediate Window (see Figure 5).

Figure 5. Using the SOS debugger extension

In Figure 5, we used two SOS commands (EEVersion and DumpHeap) to illustrate what the output looks like in the Immediate Window.

Combining the power and ease of Visual Studio with the in-depth CLR knowledge of SOS creates a single, integrated experience for complex debugging scenarios.

Other  
  •  System Center Configuration Manager 2007 : Creating Packages (part 3) - About Packages, Programs, Collections, Distribution Points, and Advertisements
  •  System Center Configuration Manager 2007 : Creating Packages (part 2) - Comparing GPO-based Software Distribution to ConfigMgr Software Distribution
  •  System Center Configuration Manager 2007 : Creating Packages (part 1)
  •  Microsoft Dynamic AX 2009 : Configuration and Security - Security Framework (part 3) - Security Coding
  •  Microsoft Dynamic AX 2009 : Configuration and Security - Security Framework (part 2) - Applying Security
  •  Microsoft Dynamic AX 2009 : Configuration and Security - Security Framework (part 1)
  •  Microsoft Dynamic AX 2009 : Configuration and Security - Licensing and Configuration
  •  Microsoft Dynamic AX 2009 : Configuration and Security - IntelliMorph
  •  Microsoft Dynamic AX 2009 : Reflection APIs (part 3) - Treenodes API
  •  Microsoft Dynamic AX 2009 : Reflection APIs (part 2) - Dictionary API
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us