Simplify variable debugging for C + + with visual Studio Natvis framework

Source: Internet
Author: User

It is believed that programmers who have developed UI interfaces with C + + have a headache for their variable debugging work, and because of complex inheritance relationships, it is often necessary to look at a variable for a series of deep-level clicks, such as the text of a textbox:

????

In order to see the Text property and have to click More than 10 in the debugger, this is a very inefficient process. However, VisualStudio supports custom debugger views in version 2012, and when you use custom views, you can see the text in one step. (Even the unfolding step can be omitted)

????

For more information about customizing the debugger, you can view the following articles, which are not covered here:

    1. Using Visual Studio to write maintainable native visualizations (Natvis)
    2. Visual Studio and Debugger. NATVIS Files–what can I do with them?
    3. To create a custom view of a native object in the debugger

In addition to the manual creation of the way, someone also wrote a number of common frameworks such as boost to write a custom view, we can directly call, into the previous I introduced a C + + visual debugging tool enhancement plug-in

In addition, in the upcoming visual Studio 14, this operation has been further improved, we can put the custom view file Nativs directly into the project (CTP version can already use this feature), VS also built its related template, and directly support syntax highlighting and can only prompt, very give force. For more information, refer to these two articles:

    1. Project Support for Natvis
    2. Per-project natvis files in Visual Studio "14″

Simplify variable debugging for C + + with visual Studio Natvis framework

Related Article

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.