Visual Studio 2010 debugger steps over methods and doesn't stop at breakpoints

后端 未结 12 1538
终归单人心
终归单人心 2020-12-15 16:59

My Visual Studio 2010 debugger sometimes has a very strange behaviour...

Sometimes it doesn\'t stop at breakpoints, but when it stops, and I want to step into a meth

12条回答
  •  醉梦人生
    2020-12-15 17:06

    I have just found another reason for the problem, and a fix. I am creating a Windows Forms application using C++ in Visual Studio 2010. I am using the FreeType library and some code which depends on it and for various reasons this code has to be compiled with 'No Common Language Runtime Support' selected (Properties -> Configuration Properties -> General). I was not able to get breakpoints to be hit in this non-CLR code.

    The fix is that the main app must be compiled with 'Common Language Runtime Support (/clr)', NOT 'Pure MSIL Common Language Runtime Support) (/clr:pure)'. That immediately solved the problem. I can now debug into, and hit breakpoints in, the non-CLR code, including the FreeType C code.

提交回复
热议问题