Microsoft KB Archive/130667

= You receive an error message when you press the F12 key and debug an application in Windows NT =

Article ID: 130667

Article Last Modified on 12/31/2006

-

APPLIES TO

 The Integrated Debugger, when used with:  Microsoft Visual C++ 1.0 Professional Edition

 Microsoft Visual C++ 2.0 Professional Edition

 Microsoft Visual C++ 2.1

 Microsoft Visual C++ 4.0 Standard Edition</li></ul>

 Microsoft Visual C++ 5.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 5.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 6.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q130667

<div class="symptoms_section">

SYMPTOMS
When debugging an application under Windows NT, pressing the F12 key when the debuggee (the application) has focus causes the integrated debugger to pause the debuggee and display a dialog with one of the following messages:

Break caused by hard coded breakpoint instruction.

-or-

User breakpoint called from code at

This occurs only under Windows NT, not under any other Win32 platform.

<div class="cause_section">

CAUSE
When the F12 key is pressed and the application in focus is being debugged, Windows NT calls a function similar to DebugBreak, which executes a hard coded breakpoint instruction. The integrated debugger then traps the exception generated by this instruction.

This behavior is intentional and occurs with other debuggers such as WinDbg from the Windows 32-bit SDK.

<div class="resolution_section">

RESOLUTION
While there is no way to disable this functionality, it doesn't affect the application that's being debugged other than to pause debugging and change focus. You can continue debugging by pressing the F5 key.

This can be annoying if you have an application that heavily uses the F12 key, so you may want to temporarily assign another key to handle the F12 key functionality in your program when debugging.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
On an 82-key keyboard, the affected key is the HYPHEN key. You can modify the VK_SUBTRACT value in the registry under the following key:

For more information, visit the following Microsoft Web site:

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/default.mspx?mfr=true

Additional query words: IDE

Keywords: kbbug kbdebug kbide kbprb KB130667

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.