0

I started having this (weird) problem recently. My application uses both C++ and C#, and I've been able to debug and step through the code in either my C++ Dlls or my C# assemblies.

For some reason, I can't put braeakpoints in my C# code anymore, because I'm unable to use the mouse once the breakpoint is reached. Clicking anywhere (in windows 7) seems to hang the entire O.S. for a few seconds, with a small-green-progress-bar filling up slowly where the mouse is located. When I get control of the mouse again, it's as though I did not click anywhere. I can't click "stop debug", I can't click applications in the Windows Taskbar, I can't do anything with the mouse (except hang the system for a few seconds).

Only when I hit F5 (continue the execution of the code) and the application runs again, then I can use the mouse.

Note #1: this problem also happens if I "attach to process" Note #2: this doesn't happen when I debug in C++.

Any ideas? I realize this is a "vague" question about a "vague" problem... but any help would be appreciated at this point.

Thank you.

  • 1
    My crystal ball says that you are debugging an app that called SetWindowsHookEx() to hook the mouse. Sure, that goes wrong when you break the program, Windows can't call your hook callback anymore. It puts up with that for several seconds before it gives up. That "small green progress bar" is ... unusual. Use remote debugging to work around this if necessary. – Hans Passant Jun 18 '14 at 14:38
  • Wow! Congratulations, mister Nostradamus! That's exactly what was happening... SetWindowsHookEx (or, should I say, our application's abusive use of it) was causing the problem. I'm sorry, I can't seem to give you any "official credit" since I don't have enough privileges yet. Consider yourself thumbed-uped & approved! Thanks again! – user3750061 Jun 18 '14 at 15:03

0 Answers0