Matthias Shapiro

I need fewer hobbies

Designers Guide to Debugging WPF Applications with Snoop

UPDATE: The makers of Snoop have made an installer that makes this post obsolete. Go get it… it’s well updated and worth it.

Download the super-simple Snoop files. (Just extract and run.)

Snoop is a great tool for debugging WPF applications.

It allows one to see the entire tree of the project that one is working on. For me, this meant that I can find out quickly and easily if the object I’m trying to target with a particular style or template is acutally implementing that style or template. I can check the properties of the items I thought I changed only to discover that nothing is changing. In a recent project, when I was flabergasted as to why my design wasn’t showing up, Snoop helped me determine that it was an error in the code implementation, which is translated roughly into “not my fault”.

 Unfortunately, when I first realized I needed it, it took me a while to figure out how to get it to run.

 “a while” in this instance means 3-4 hours and one hour worth of IM with a developer friend.

The problem that I had was that actually running Snoop isn’t a very designer friendly process. You have to download the source code, convert the file formats, change the read-only settings, and a number of other things before you can get it to work. So I decided to give anyone who isn’t interested in that process a shortcut to debugging their WPF applications.

Just download this and run the snoop.exe file. No Visual Studio nonsense required. Check this link for more information on using Snoop.

This entry was posted in WPF and tagged , , . Bookmark the permalink.

0 Responses to Designers Guide to Debugging WPF Applications with Snoop

  1. Pingback: Designer WPF » Blog Archive » ListView (and ListBox) Performance Issues

  2. tmarr8

    I will add a couple of additional tips on snoop:
    + if you are running Vista, make sure you right click on snoop.exe and select “Run as Administrator.” Otherwise, some applications won’t be visible.
    + to snoop an application, select the application from the first snoop window then click Snoop
    + to snoop an item within an application, hold down the shift and ctrl buttons while mousing over the item in the running application you are snooping.
    + on the bottom right corner of the Snoop window, there’s an “on” button and magnifying glass. Click the on button to get a preview (picture) of the item you are snooping
    + in many cases, you can click and change a property in the snoop application and the property will change in the application you are snoop (e.g., change a border background to red). This is very cool.