Snoop - The WPF Spy Utility
Clone or download
cplotts Merge pull request #81 from batzen/Chocolatey
Adding build script, dependency management and packaging for deployment
Latest commit 1f94efc Sep 7, 2018


Snoop is the open source WPF spying utility created by Pete Blois when he was employed at Microsoft and now maintained by myself Cory Plotts. Over time contributions have been added by several people, most notably: Dan Hanan, Andrei Kashcha, Maciek Rakowski, Bailey Ling, and Bastian Schmidt.

It allows you to spy/browse the visual tree of a running application (without the need for a debugger) ... and change properties ... amongst other things.

Snoop 2.9.0

The most recent version of Snoop, Snoop 2.9.0, was released on July 27th, 2018. The big addition in 2.9.0 was the inclusion of the triggers tab which was a useful feature of another WPF spying utility called WPF Inspector (written by Christan Moser). It was ported to Snoop by Bastian Schmidt.

Documentation on How to Use Snoop

Unfortunately there isn't any exhaustive documentation on how to use Snoop and there are plenty of hidden features. If someone is willing to work on this, please let me know. On the bright side, it is a pretty easy utility to use and learn. I have made three videos which should get most people quick started.

Here are the links to the current Snoop Tips & Tricks: #1, #2, #3.

Why Aren't My Apps Showing Up in the App Chooser?

One question that comes up all the time is the situation where the application you are trying to Snoop, isn't appearing in the application chooser (i.e. the  combo box that lists the processes you can Snoop). This is more than likely a situation where the application you are trying to Snoop is running elevated (as Administrator). In order to Snoop these applications, you will also need to run Snoop elevated (as Administrator).

Why Can't I Snoop WPF 3.5 Applications?

Well, you can! You will just need to use Snoop 2.9.0 and earlier, in order to do so. As part of the process of moving to Visual Studio 2017, we have dropped support for WPF 3.5 applications.

Snoop's Gitter Room

I recently created a Gitter room for Snoop.

How Do I Build Snoop?

I just upgraded all the projects in Snoop so that you can build it with Visual Studio 2017. This means that I deleted all committed binaries. In other words, you should be able to open Snoop.sln and rebuild all and those binaries (like Snoop.exe, the managed injector dlls, and the managed injector launcher exes) will all get rebuilt.

Note that if you are going to run Snoop somewhere where you haven't built it ... you are likely going to need the Microsoft Visual C++ Redistributable(s) for Visual Studio 2017 ... for both x86 and x64 ... installed on that machine. See here for some download links to the redists.

How Do I Build Earlier Versions of Snoop (2.9.0 and Earlier)?

Most people will only need to load the SnoopOnly.sln solution file. This solution will build under most versions of Visual Studio, most notably Visual Studio 2017. The main Snoop project intentionally targets .NET 3.5 Client Profile because Snoop has, for years, supported Snooping both .NET 3.5 and .NET 4.0 applications. At some point in the future, we will change this and Snoop will only support Snooping .NET 4.0 (and forward) applications.

The full Snoop.sln solution file includes the projects for the managed injector and the managed injector launcher projects ... as well as the installer. Currently, Snoop can only fully be built (Snoop.sln) with Visual Studio 2010 and with the Windows Installer XML Toolset v3.5 installed. The WiX Toolset v3.5 is not easily available anymore. I have an Wix35.msi saved that I can happily give to anyone who wants to build the installer. Contact me on Snoop's new Gitter community.

One other interesting piece of related info is that Setup.exe is a bootstrapper that installs the MSVC++ 2010 redestributables that then launches Snoop.msi. I don't have the source code for this bootstrapper as it was done by a friend of mine. Setup.exe is included in the source code.

I am also looking for someone who might want to help update the installer so that it uses a modern version of WiX ... or in general to own the installer part of Snoop as I have little interest in that. Contact me if you are interested.