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:
- Using Visual Studio to write maintainable native visualizations (Natvis)
- Visual Studio and Debugger. NATVIS Files–what can I do with them?
- 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:
- Project Support for Natvis
- Per-project natvis files in Visual Studio "14″
Simplify variable debugging for C + + with visual Studio Natvis framework