Disabling F12 in Visual Studio

Started by
3 comments, last by benryves 14 years, 2 months ago
Whenever I hit F12 when debugging an app in Visual Studio, and that app has focus, I get the following message:
Quote:Windows has triggered a breakpoint in appname.exe. This may be due to a corruption of the heap, which indicates a bug in appname.exe or any of the DLLs it has loaded. This may also be due to the user pressing F12 while appname.exe has focus. The output window may have more diagnostic information.
Is there some way to disable this feature? I haven't found any references to it in the keyboard options, and it does rather get in the way when debugging an app that uses F12 as one of its own shortcuts. It does rank as one of the more useless messages I've seen (not being able to differentiate between heap corruption and the user pressing F12?) but I'm not entirely sure what's triggering the message so it may well be something that's beyond Visual Studio's control.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Advertisement
Wow, it's a feature I've never noticed before!

Here's some more information. And here's a workaround.
A quick little google turned this up: http://msdn.microsoft.com/en-us/library/ms646309%28VS.85%29.aspx
Quote:
Windows NT4 and Windows 2000/XP: The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.

So it seems using F12 is just a bad idea. But I totally agree that the Visual Studio error message is horribly uninformative [smile]
Sorry I've got no help... but I laugh my ass off every time I see that dialog.
"OMG You've corrupted teh RAM!!!! or maybe you just pressed F12, I can't really tell... either way, stop iiit!"
Cheers, I suppose it makes sense that it's Windows triggering the breakpoint, hence the rather useless message in Visual Studio. I'll give that registry key a whirl. [smile]

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

This topic is closed to new replies.

Advertisement