如何调试使用boost w / o失去理智的代码? [英] How to debug code that uses boost w/o losing sanity?
问题描述
Boost是一组很好的图书馆,它真正提高了生产效率。但使用它的调试代码是一个完全的恶梦。当然,跨越二万个头文件可能是一个宝贵的智力练习,但如果你需要一遍又一遍地做什么呢?
Boost is a great set of libraries and it really boosts productivity. But debugging code that uses it is a total nightmare. Sure, stepping through twenty thousand header files can be a valuable intellectual exercise, but what if you need to do it over and over again?
有开发人员友好的方式只是跳过升压部分并让调试器直接转到我的代码?
Is there a developer-friendly way of just skipping the boost portion and having the debugger go straight to my code?
Visual Studio有一个 DebuggerStepThroughAttribute 。有什么类似的本机C ++?
Visual Studio has a DebuggerStepThroughAttribute for .NET framework. Is there anything similar for native C++?
推荐答案
您可以通过使用。只需使用以下方式:
You can skip the boost namespace entirely by using the techniques described here. Just use something like:
boost\:\:。* = NoStepInto
...在相关的注册表项。
... in the relevant registry entry.
但是,如果您的代码从boost中调用(例如通过 boost :: function
或类似),那么您的代码也将被跳过!如果有人能找出 问题的良好解决方案,我会感兴趣...
However if your code gets called from within boost (e.g. through a boost::function
or similar) then your code will be skipped as well! I'll be interested if someone can come up with a good solution for that problem...
这篇关于如何调试使用boost w / o失去理智的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!