Visual Studio debugger tips & tricks (for C/C++ projects)

前端 未结 7 1152
梦谈多话
梦谈多话 2021-02-02 16:22

I\'m interested in tips and tricks regarding debugging a C/C++ project in Visual Studio\'s debugger. I recently found out that if you have a pointer to a certain data type, let\

7条回答
  •  终归单人心
    2021-02-02 16:41

    I really like the possibility to tweak the Debugger display of types and structures through AutoExp.dat. The file is located at

    ..\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\autoexp.dat

    and allows to define own templates for the display of data during debugging:

    While debugging, Data Tips and items in the Watch and Variable windows are automatically expanded to show their most important elements. The expansion follows the format given by the rules in this file. You can add rules for your types or change the predefined rules.

    The file is full of good examples and you can easily adapt certain templates to your own needs or add new ones for your own classes.

提交回复
热议问题