Debugging C++/Cli: <Unknown function> and no Locals

风流意气都作罢 提交于 2019-11-27 14:45:54

Unfortunately pieces of the tooling support in VS for C++/CLI projects keep falling off, they are struggling to keep it maintained. There's an issue with the new debug engine added to VS2012, the one that supports the new C++ debugging visualizers, it doesn't support C++/CLI anymore.

VS2012 Update 1 added a new setting in Tools + Options, Debugging, General, named "Managed C++ Compatibility Mode". Confusingly renamed to "Use Managed Compatibility Mode" in VS2013. Undocumented in the MSDN page for this settings page. What it does is force the debugger to use the old debugging engine instead of the new one.

This does have a side-effect, those shiny new debugging visualizers won't work when you have the option turned on. Keep this in mind if the debug info for your native code doesn't look right.

I found the solution: The mixed-mode debugging setting on the projects is not enough alone, in addition, Visual Studio requires enabling

[x] Use Managed Compatibility Mode

in Tool->Options->Debugging->General.

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