I want to debug a part of a program that is intended to respond to keyboard input such as Ctrl+↑.
So, I put a breakpoint in the code in the area interest. However, once I press the Ctrl key the program jumps to that breakpoint. This happens before I have pressed an arrow key, so I’m finding this situation difficult to debug.
So, how can I debug a multi-key input event such as Ctrl+↑?
If you are using Visual Studio to debug your code, you can debug this situation by adding a condition to your breakpoint.
To do so, right-click the break point icon to the left of your code statement and click
Condition...An example of a condition that would apply to your situation is:Now you can debug multi-key input events such as Ctrl+↑ without the need to change any of your code.