Sign in to follow this  
benryves

Disabling F12 in Visual Studio

Recommended Posts

benryves    1999
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.

Share this post


Link to post
Share on other sites
Promethium    580
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]

Share this post


Link to post
Share on other sites
benryves    1999
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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this