C++ 是否可以让调试器显示boost函数对象指向的函数的名称?
在VisualStudio中使用boost函数和bind调试代码时,我希望调试器能够显示boost函数指向的实际函数的相关信息。例如,函数名、原始函数的签名(在对其使用bind之前)或函子的状态 目前,我必须一步一步地检查代码,以找出它是哪个函数,这需要首先一步一步地检查boost代码 有人知道这件事是否已经做了,或者甚至可以做吗 谢谢大家! 编辑我也很高兴发现现在有人已经找到了这个问题的答案:C++ 是否可以让调试器显示boost函数对象指向的函数的名称?,c++,visual-studio,debugging,boost-bind,C++,Visual Studio,Debugging,Boost Bind,在VisualStudio中使用boost函数和bind调试代码时,我希望调试器能够显示boost函数指向的实际函数的相关信息。例如,函数名、原始函数的签名(在对其使用bind之前)或函子的状态 目前,我必须一步一步地检查代码,以找出它是哪个函数,这需要首先一步一步地检查boost代码 有人知道这件事是否已经做了,或者甚至可以做吗 谢谢大家! 编辑我也很高兴发现现在有人已经找到了这个问题的答案: (我的意思是:如何跨过boost代码,但仍然跨入boost::function调用的代码…)中提到的
(我的意思是:如何跨过boost代码,但仍然跨入boost::function调用的代码…)中提到的问题。boost中有一个倡议。已经有针对不同类型(变量、多索引、共享ptr等)的调试可视化工具 不幸的是,boost::function不在这里,但您可以自己编写一个可视化工具,如这里所述(并可能将其提交给boost;)。或者,你可以请求为你写一封信 问候,
Ovanes使用VisualStudio及其调试可视化工具,正如Ovanes所指出的,当鼠标悬停在变量上时,可以获得指向的函数 由于我不想在这篇文章中充斥着垃圾信息,我只在这里提供了前12种函数类型。如果你真的需要更多,你很可能会扩展它。我将类似的代码发送给boostdoc开发人员,最终它也将在那里发布 目前,这种可视化工具类型将或多或少地显示垃圾,而实际上没有任何东西绑定到函数对象。请注意,这是一个早期的草案
boost::function0<*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function1<*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function2<*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function3<*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function4<*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function5<*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function6<*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function7<*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function8<*,*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function9<*,*,*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function10<*,*,*,*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function11<*,*,*,*,*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function12<*,*,*,*,*,*,*,*,*,*,*,*,*> { preview( #("func=", $e.functor.bound_memfunc_ptr.memfunc_ptr) ) }
boost::function0{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function1{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function2{预览(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function3{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function4{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function5{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function6{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function7{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function8{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function9{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function10{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function11{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}
boost::function12{preview(#(“func=,$e.functor.bound_memfunc_ptr.memfunc_ptr))}