Snoop, the spy utility for WPF, is invaluable in my work. I use it nearly every day that I’m working on WPF visuals, behaviors, styling and so on, and would not care to work on WPF applications without it. And then, one dark day in mid-January, Snoop broke.
But let me go back a bit further. On darker day in mid-January, before Snoop broke, I broke my ankle. This was no run-of-the-mill exercise injury, mind you, this injury was sustained when I was walking. Downhill. I had an ankle dislocation with two broken bones that necessitated surgery; at this time I’m barely to the middle of planned recovery from the injury, it was just six weeks ago today.
Happily my clients at the time were good people and allowed me to continue to work for them from home. I was building a new WPF kiosk app for their customer, a nationwide retail chain (that I can’t mention quite yet). That went along swimmingly, aside from missing out on regular, face-to-face daily contact with the folks I was working with. Then, real disaster struck… Snoop broke.
Snoop had been working fine, even when remoted into my development computer. So it camse as a surprise when several days after I started working from home Snoop stopped working. Or, rather, Snoop became invisible, which made it rather difficult to use. Invisible as in transparent. I could still switch to the Snoop Window and move it around using the system menu (Alt-Space, M to move it about). There was even a dotted line outline as I moved the window, but no window contents.
Interestingly, Snoop appeared to keep one of the computer’s CPU cores quite busy. Attaching a debugger revealed that it was busy handling WM_PAINT messages. A bit ironic, I thought, as Snoop was invisible.
Searching the web was fruitless at first, yielding nothing that seemed at all helpful. But on one of my later searches I ran across this tidbit:
“Update: I found the problem! All of my dev systems are on a switchbox. The system I was having issues with is a recent addition, and has a video card with two display ports as outputs. Since my switchbox does not support display port, I have to make sure that when I reboot the system, that I switch the input on my monitor to the display port, or I get no video output displayed on the monitor. Apparently this server was rebooted recently causing this scenario with no video. However, I can RDP to the system and use it fine which is how I do most of my work. When the display is not initialized on reboot, this apparently causes Snoop to have issues with its UI initialization. I rebooted the system and got the video initialized, then RDP’ed into the system again, fired up Snoop, and UI on the first load! WOOT! Its gonna be a good day!
”
Eureka! The discussion sounded much like the issue I was seeing, especially as one of my monitor cables had a tendency to come loose, so I fired off an email to a couple of devs in the office. One of them came back saying that someone had (ahem) borrowed one of my monitors so he had attached a new one and made sure the cables were firmly attached.
After a quick reboot I found that Snoop worked once again. That is, it was no longer invisible, no longer transparent. Imagine that. It was a long and painful lesson, but a lesson learned nonetheless. I just hope I don’t have to relearn it.