开发者

Break when hotkey is pressed

开发者 https://www.devze.com 2023-01-25 15:41 出处:网络
I\'m doing a lot of GUI and graphics stuff and sometimes it would be convenient to break the running program when I press a hotkey.

I'm doing a lot of GUI and graphics stuff and sometimes it would be convenient to break the running program when I press a hotkey.

Example: I want to analyze behaviour that depends on the current mouse position. I would like to place an inactive breakpoint, move the mouse to the interesting spot, press some hotkey, and voilà: The breakpoint is now active and a moment later (e.g. next repaint) the program breaks.

Is there some hidden Visual Studio 2008 feature开发者_Go百科 that can do that?


Have you tried Ctrl + Break?

Edit
Or, for only when conditions are met, you could use Debug.Assert(condition) to specify a condition. I believe it asks you if you want to edit/continue/close the program when the condition is false.

0

精彩评论

暂无评论...
验证码 换一张
取 消