views:

479

answers:

2

I am deep in the middle of troubleshooting some Windows API messaging problem and I find that Spy++ is not working anymore. It doesn't even work on Notepad. On some occasions, it brings up this message:

---------------------------
Microsoft Spy++
---------------------------
Spy++ has encountered a problem in the message hook. To prevent 

hanging the system, the hook has been disabled, so no further 

messages will be logged.Please restart Spy++ to re-enable 

message logging.
---------------------------
OK   
---------------------------

Any known reasons for this to happen?

Edit: Just wondering: could this be due to my anti-virus or a Windows update? Or some other program playing with message hooks?

+2  A: 

Don't know about the specific error, but if Spy++ is misbehaving, it may be worth trying Winspector instead.

anon
I just did and it's great.
Vulcan Eager
+1  A: 

I've sometimes problems with others programs that install a global hook and don't play right with spy++, try stopping all programs that you don't need to debug. Try also rebooting the machine just to be sure.

Also has often happened in the pass that trying to debug with VS and spy++ caused the whole machine to hang. A better approach is to use remote debugging in a completely clean machine to ensure that I don't have any interference from others programs (a virtual machine can be fine to such cases).

As Neil stated Winspector uses a different hooking mechanism and may work in situations where spy++ will fail, although sometimes the message logs is too nice (at least for me).

Ismael