SOS usage Summary

Source: Internet
Author: User

SOS is a memory monitoring tool provided by VS. It can monitor memory data in real time during debugging.

Before using SOS, you must first understand several common debugging concepts.

Managed code and unmanaged code:

Managed Code:

Managed code is code written in one of over twenty high-level programming languages that are available for use with the Microsoft. NET Framework, including C #, J #, Microsoft Visual Basic. NET, Microsoft JScript. NET, and C ++. all of these versions share a uniied set of class libraries and can be encoded into an Intermediate Language (IL ). A runtime-aware compiler compiles the IL into native executable code within a managed execution environment that ensures type safety, array bound and index checking, exception handling, and garbage collection.

Common managed code:

1. Code that is executed by the CLR.
2. Code that targets the common language runtime, the foundation of the. NET Framework, is known as managed code.
3. managed code supplies the metadata necessary for the CLR to provide services such as memory management, cross-language integration, code access security, and 4. 4. automatic life time control of objects. all code based on IL executes as managed code.
Code that executes under the CLI execution environment.

Managed Debugging: Managed Debugging

Debugging only for hosted code is called hosting debugging.

SOS command

! Load SOS: Start SOS. SOS cannot be loaded only when hosting debugging is executed. The solution is to enable unmanaged code debugging on the project> Properties> debugging page. Add breakpoint, Debug

! CLRStack-n

! DumpDomain

! DumpObj

! DumpHeap-type className

! DumpMT

! U methodAddress

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.