MFC C++/CLI project: /CLR switch in VS2012 causes

2019-06-11 09:18发布

问题:

The company has upgraded our IDE from VS2008 to VS2012. When I try to debug my C++/CLI project (created with VS2008), I no longer seem to see items such as the 'this' pointer, STL containers, data members in structures, etc.

From VS2012, I tried to create a new MFC "Multiple documents" project and set a breakpoint at the end of its CMainFrame::OnCreate(). Everything is fine when I debug, but as soon as I enable /CLR, I get the issue described above.

Is there a new switch in VS2010/VS2012 that I need to toggle somewhere?

Yes, Debugger type is "Mixed". In fact, I haven't changed any project settings (which were working fine in VS2008)

回答1:

Answer: Issue with Update 2 of VS2012 (see Grys73's post in http://connect.microsoft.com/VisualStudio/feedback/details/751327/debugger-stepping-in-mixed-mode-application-is-very-very-slow)

Indeed, after a System Restore, I reinstalled VS2012 completely without Update 2 and the debugger works perfectly.