Why Visual Studio's debug mode Step Into (F11) sometimes doesn't enter inside some functions?

末鹿安然 提交于 2019-12-05 02:50:31
harper

You need debugging information to enter the glutMainLoop. When no source code or no debugging info is available for glutMainLoop the debugger can't display source code. When you want to single step this function you need to add both.

Alternatively you can enter to disassembly using Shift-F11. But I dont't think that this will help in this case.

Worth a quick check..

In Visual Studio, go to Tools > Options...

Click Debugging on left side

On the left look for Enable Just my Code (Managed) if it is checked, uncheck it, hit "OK"

For good measure I always exit VS and go back in

When stepping through the code in CameraMain, do you expect to be able to step into display on the call to glutDisplayFunc(display);?

In that case it doesn't happen because the display function is not called at that point. Instead it is saved by GLUT to be called from inside the GLUT main loop. You have to set a breakpoint in the display function to be able to step through it.

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