GUI does not redraw while stepping in Debug Mode

后端 未结 3 428
心在旅途
心在旅途 2021-01-21 16:37

In any .NET 2.0 Winforms application, if you run the code in Debug Mode, and you either hit a breakpoint or otherwise Step Into the code line by line, and you want to see the GU

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-21 17:41

    Like everyone else has said in answers and comments, the UI thread is blocked so it cannot be redrawn.

    However, if all you want to do is see the GUI, and not interact with it, and you are running Windows 7/8 (which sounds unlikely since you're using VS2005) and haven't disabled aero peek, you can mouse over your application in the task bar and Windows will show the preview thumbnail. When you mouse over the thumbnail, you can "peek" at the application even when the breakpoint is blocking the UI thread.

提交回复
热议问题