Note that there are some explanatory texts on larger screens.

plurals
  1. PODisable VS debugger for specific thread
    primarykey
    data
    text
    <p>I'm writing some open source software to capture and process raw mouse and keyboard events. When an event is captured, I communicate with a win32 window to ask precisely what to do with the event (i.e. pass it along or consume it). It's actually quite similar to HIDMacros.</p> <p>The section which ultimately decides whether or not to consume an event actually runs in a memory space that I DO NOT control (i.e. something that Windows itself is running). Which means, unfortunately, I have almost no ability to debug that section of code. Fortunately it is very simple code and I haven't had to debug it yet.</p> <p>On the other side of things, I've got a Win32 event loop running in its own thread, and handles the requests sent by the aforementioned section of code. So the above section sends this window a message, it decides what to do, and returns an answer. Simple enough.</p> <p>THE PROBLEM is this. When I attach a debugger, only the win32 window event loop is stopped. The other code keeps right on running since it's not in my actual memory or process. And when the user does something like, oh say, press F10 (to step to the next line), the keyboard hook that I've registered will (1) catch the keystroke, and (2) call off to my win32 window for an answer. Unfortunately the window is frozen by the debugger. The end result is: I press F10, and visual studio never receives my keystroke. Visual studio itself stops responding to all input, it freezes, and I have to kill VS itself.</p> <p>Now I've managed to work around the problem SOMEWHAT by using timeouts, but it's really annoying (i.e. very perceptible) and not at all ideal. What I'd like to know is, is there a programmatic way to exclude a particular thread from the debugger? Is there a way to ask the VS debugger NOT to stop the execution of a particular thread? Barring that, is there any way to make the debugger itself execute a certain action before suspending normal execution, and again after resuming normal execution?</p> <p>This library will be used in other projects. I'd really like it if people didn't suddenly lose the ability to use their keyboard while debugging JUST because they decided to link against MY library. :) Any help is appreciated, thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload