Visual Studio 2015 - Prevent debugger stepping into STL code (specfically std::function) but still step into any usercode the stl calls to

倖福魔咒の 提交于 2019-12-09 11:59:19

问题


I am trying to make debugging std::function-heavy code less of a nightmare. What I want to happen is to be able to do is step directly into the lambda body in this example:

std::function<void(void)> lam_dostuff = []() {
    printf("stuff has been done\n");
};

lam_dostuff();

I did some research and found out that the C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter file contains step-into overrides. I can add the rule <Function><Name>std::.*</Name><Action>NoStepInto</Action></Function>, and this does prevent me from stepping into any stl code, but it also prevents stepping into user code that is called as a result of the stl call. I tried adding the rule <Function><Name>std::_Invoker_functor::_Call.*</Name><Action>StepInto</Action></Function>, the signature for the final step of a std::function invocation, to no avail.

Is there anything I can do to get the result I want?

来源:https://stackoverflow.com/questions/37450489/visual-studio-2015-prevent-debugger-stepping-into-stl-code-specfically-stdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!