c++ - Disable VS debugger for specific thread -


i'm writing open source software capture , process raw mouse , keyboard events. when event captured, communicate win32 window ask precisely event (i.e. pass along or consume it). it's quite similar hidmacros.

the section decides whether or not consume event runs in memory space not control (i.e. windows running). means, unfortunately, have no ability debug section of code. fortunately simple code , haven't had debug yet.

on other side of things, i've got win32 event loop running in own thread, , handles requests sent aforementioned section of code. above section sends window message, decides do, , returns answer. simple enough.

the problem this. when attach debugger, win32 window event loop stopped. other code keeps right on running since it's not in actual memory or process. , when user like, oh say, press f10 (to step next line), keyboard hook i've registered (1) catch keystroke, , (2) call off win32 window answer. unfortunately window frozen debugger. end result is: press f10, , visual studio never receives keystroke. visual studio stops responding input, freezes, , have kill vs itself.

now i've managed work around problem using timeouts, it's annoying (i.e. perceptible) , not @ ideal. i'd know is, there programmatic way exclude particular thread debugger? there way ask vs debugger not stop execution of particular thread? barring that, there way make debugger execute action before suspending normal execution, , again after resuming normal execution?

this library used in other projects. i'd if people didn't lose ability use keyboard while debugging because decided link against library. :) appreciated, thanks.

hmya, using global hooks, disruptive. nothing can debugger, copy of dll got injected visual studio making sendmessagetimeout() call hangs. isdebuggerpresent() not going useful.

one possible workaround check in process dll got injected. use getmodulefilehandle, passing null, on first callback get. if see devenv.exe bypass forever. beware local state, not shared.

another approach switch mode on first timeout get. bypass sendmessage call while (say 5 minutes) when happens these timeouts not noticeable anymore.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -