Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
数组和 std::vectors(以及所有标准容器)在 Visual Studio 调试器中是可浏览的(您可以将鼠标指针悬停在它们上面并检查它们的内容)。
有没有办法准备一个自定义容器类,允许以与 std::vector 相同的方式浏览其内部数据?
尝试查看文件%VSINSTALLDIR%\Common7\Packages\Debugger\autoexp.dat。对不同数据类型的扩展规则有可定制的描述。
%VSINSTALLDIR%\Common7\Packages\Debugger\autoexp.dat
从这个文件:
调试时,Watch 和 Variable 窗口中的 Data Tips 和项目会自动展开以显示它们最重要的元素。扩展遵循此文件中的规则给出的格式。您可以为您的类型添加规则或更改预定义的规则。
类似的问题