Share via


Setting a Breakpoint on a Message Received by a Windows Function

You can set message breakpoints to stop the debugger when a particular WndProc function message is received.

Note   Message breakpoints work only on x86- or Pentium-based systems.

To set a breakpoint on a message

  1. From the Edit menu, click Breakpoints.

    The Breakpoints dialog box appears.

  2. Click the Messages tab.

  3. In the Break At WndProc text box, type the name of the Windows function.

    If you are setting a breakpoint during a debug session, the list contains the exported functions in your project.

  4. In the Set One Breakpoint For Each Message To Watch list box, select the message.

  5. To set another breakpoint, press ENTER, and then repeat steps 3 and 4.

    The Breakpoints list displays the currently active breakpoints.

  6. Click OK to set the breakpoints.

Note If you interrupt execution while Windows or other system code is running, the results can be unpredictable.