When debugging a program that hosts code and does not host code at the same time, pay special attention to choosing the appropriate debugger type. Because I have seen many similar questions, I will write the practice here.
Before debugging in a hosted project, you need to enable the function of debugging the unmanaged code. This option exists in the debug option of the Project property:
Just hook up.
If attach is a process, select the process type in the attach to process dialog box:
It is automatically selected by default, but this is not always correct. It is best to select the correct type. Click Select to bring up the Select Code Type dialog box:
For example, if you are debugging hosted and non-hosted mixed code, you can check both managed and native code.
Author: Atfield)
Blog: Http://blog.csdn.net/atfield
Http://blogs.msdn.com/yizhang
Reprinted please indicate the source