Bookmark and Share Share...    Subscribe to this feed Feed   About Christian Moser  


WPF Inspector

WPF Inspector is a utility that attaches to a running WPF application to troubleshoot common problems with layouting, databinding or styling. WPF Inspector allows you to explore a live view of the logical- and visual tree, read and edit property values of elements, watch the data context, debug triggers, trace styles and much more. Since March 2011, WPF Inspector is open source and available on CodePlex.

Download WPF Inspector from CodePlex





Last modified: 2017-04-18 07:14:53
Copyright (c) by Christian Moser, 2011.

 Comments on this article

Show all comments
Steve
Commented on 1.July 2010
Are there any plans for .NET 4.0 support?
Mike Strobel
Commented on 1.July 2010
+1 for .NET 4 support! I'd be glad to help in any way I can.
Christian Moser
Commented on 2.July 2010
Hi Steve and Mike,

First I have to fix a lot of issues for version 1.0 :-) But then I will shurely come up with a version that supports .NET 4.0.

If you have any other ideas or feature requests, just let me know.

Greetings
Christian
Tim
Commented on 4.July 2010
Hey christian!
I really like the look of the way you've styled your buttons.
I've been trying to create a simular style myself, but i havent really had much luck, and there also isnt many tutorials available.
it would be really cool if you could maybe share the style for your buttons and maybe a few other UI elements and maybe annotate them or whip up some type of tutorial?
that would help me and im sure alot of other people

thanks alot (:
Kevin
Commented on 5.July 2010
Awesome tool!! way better that snoop. keep up the good work. Christian! thanks a lot!
David
Commented on 7.July 2010
Hello, thanks for this great app!. Any chance to use it with XBAP applications?
Thanks, David
Christian Moser
Commented on 8.July 2010
Hi David,
unfortunately not yet, but that's a good remakt. I will try to make it work also for XBAPs in a future version.

Greetings
Christian
David
Commented on 9.July 2010
Thanks!
Stefan Barthel
Commented on 20.July 2010
Awesome tool! After hours of try and error the Inspector helped me fixing a data binding issue within 10 mins... Thanks!
Mary
Commented on 22.July 2010
When attempting to inspect MetroTwit (www.metrotwit.com) with v0.9.3, a dialog window is displayed with the following message:

Application inspection failed.
Object reference not set to an instance of an object.
Curry
Commented on 23.July 2010
Object reference not set to an instance of an object.
Christian Moser
Commented on 23.July 2010
Hi Mary and Curry,
I am working on this issue. It will be fixed in the next version.

Greetings
Christian
Brandon Truong
Commented on 29.July 2010
I have the same error "Object reference not set to an instance of an object."
Hope to see the next version soon.
Mahesh Kumar R
Commented on 29.July 2010
When I launch the application, on start up I'm getting this error.
Cannot create instance of 'SelectorWindow' defined in assembly 'Inspector, Version=0.9.4.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'UserInterface/SelectorWindow.xaml' Line 1 Position 9.

any clue-winxp,
Christian Moser
Commented on 29.July 2010
Hi Mahesh,
can you try out if the problem still exists with version 0.9.5. Maybe it was a corrupt installation. Please make sure that you have .NET 3.5 SP1 installed!
yinru
Commented on 30.July 2010
Hi, Chris:
I launched excel which has Excel addin (written in WPF), then I started WPF inspector. It recognizes excel add in, however it shows nothing, no properties, no DataContext, no resources, no Triggers. I also tried snoop, the same. I wonder if you can add support to COM Add In written in WPF in the future? thanks
Christian Moser
Commented on 30.July 2010
Hi Yinru,

thanks for your feedback. I currently have the same problem with ClickOnce applications. I try to fix that in a future version.

Greetings
Christian
Mike Strobel
Commented on 3.August 2010
Hi Christian,

I love your WPF Inspector utility. Have you considered open-sourcing it on CodePlex? It's always nice when we can contribute back to the utilities that we get so much use out of :).

Cheers,
Mike
Rik Robinson
Commented on 4.August 2010
This looks great and was looking forward to it, but it does not detect my application as a WPF application. What criteria does it use to make the decision whether it's a WPF app or not?
Nagamahendra
Commented on 11.August 2010
Hi,

The site is too good.I am new to WPF . I just want to Know What is this Inspector.And What is the use of this tool . I want to know , what are all prerequisite softwares need to be installed in my System or laptop to run this tool.

Thanks
Nagamahendra.
Erick
Commented on 25.August 2010
I have a WPF window hosted by a WinForm ( because I was having keyboard entry issues). The Winform is called from an Excel VSTO add-in. Inspector sees my WPF Window. After running the "inspect", Inspector has no contents listed. Any "Ctrl" hit after that causes Excel to crash
Erick
Commented on 25.August 2010
I have a WPF window hosted by a WinForm ( because I was having keyboard entry issues). The Winform is called from an Excel VSTO add-in. Inspector sees my WPF Window. After running the "inspect", Inspector has no contents listed. Any "Ctrl" hit after that causes Excel to crash
Andrew
Commented on 26.August 2010
Would be GREAT if this could support .NET 4 and specifically debugging binding issues in the new DataGrid control.
biju
Commented on 9.September 2010
Awesome application...
Siavash
Commented on 10.September 2010
A Question:
Which on is better: "Snoop" or "WPF Inspector"?
By the way tnx a lot for this nice application ;)
Christian Moser
Commented on 14.September 2010
Hi Siavash,
I think both tools have advantages. WPF Inspector can debug triggers, list resources or show the logical tree. Snoop instead can trace events and works with .NET 4.0.

Greetings
Christian
Wouter
Commented on 17.September 2010
Object reference not set to an instance of an object. (Version 0.9.5)
Laurent Kempé
Commented on 22.September 2010
I also get an error "Object reference not set to an instance of an object." with version 0.9.5
Sam
Commented on 23.September 2010
I am a new developer of WPF and want to learn it but there are a lot of concepts that I couldn't understand. Is there anyone who can help me understand What is exactly the DataContext? View is the UI (Presentation)
Core is the logic of any application (BaseCode)
What is the ViewModel then?
Another question is .xaml and .cs are understood
What is .xaml.cs files?

Larry Maturo
Commented on 1.October 2010
I take it this only works with 32 bit programs as on my 64 bit computer it crashes every time I try to use it on a program that has only two buttons.
Greg Davery
Commented on 2.October 2010
I am using 0.9.5 with a WPF application created in Visual Studio 2010 on a Windows 7 64 bit machine and am getting the Object Reference not set.. when clicking on my WPF application. Shame because this looks really useful.
Brown
Commented on 6.October 2010
love it
Mello
Commented on 17.October 2010
Is possible to get browser application? Because here, not working...
Sam
Commented on 26.October 2010
Haii Christian..
One of the most useful sites for WPF leaners..
U helped me a lot..
Thanks..
Junicus
Commented on 28.October 2010
Any chance that you are working on a .net 4.0 version???
Riki
Commented on 3.November 2010
Cool application, it has helped me a lot, thank you
A developer
Commented on 5.November 2010
I propose you to hide your comments? Otherwise this "love" an "nice" and "awesome"
sounds very unreliable or written by yourself.

Ben
Commented on 9.November 2010
Excellent application. I really like the clean elegant UI and the button style. Good job.
Ben
Commented on 10.November 2010
I really like the button style in this application. Would you consider making the xaml for the button ControlTemplate available?
Phil
Commented on 15.November 2010
I get the 'object reference not set to an instance of an object' error as well, but looking in the event log, the actual error seems to be:

Activation context generation failed for "C:\Program Files\WPF Inspector\Hook32.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

does this need visual studio 2008 (i'm running 2010) in order to work?
bibin
Commented on 6.December 2010
Hi I am bibin

Thanks for the information regarding wpf inspctor.Its helping me
a lot for my wpf application development.
pradeep
Commented on 8.December 2010
I get the 'object reference not set to an instance of an object' error as well.

Activation context generation failed for "C:\Program Files\WPF Inspector\Hook32.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
Mickey
Commented on 19.December 2010
Hi,
Using of inspect by "WPF inspector" collapse our application and VS view error message
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
Somebody meet this issue too?
It's something known?
Thanks in advance,

Mickey.
Jawahar
Commented on 28.December 2010
Hi,

This is good. But I love to know how you get all the opened applications in the desktop and how you detecting whether it is a WPF app. or not. It is really good if you share these here.

Regards,
Jawahar
bbqfrito
Commented on 28.December 2010
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
Vins
Commented on 3.January 2011
Christian,
I can't get it to work.. Version 0.9.5 gives me error "Object Reference Not Set" when I click Inspect after selecting my wpf application.
Any clue?
Thanks!
xusan
Commented on 10.January 2011
Would be very appreciated to see it working on WPF 4.0 coz we haven't been using 3.5 for a long and may be would not work on that version soon, any ways thank you for sharing this wonderfull tool
shemesh
Commented on 17.January 2011
same as the one above me. i get this error.
Tony
Commented on 18.January 2011
Very usefull tool I used under Windows 7 x64 and Visual Studio 2008
since I work with Visual Studio 2010, it's no longer working
if you release the source code, we could help you improve this great tool
(note : Snoop is also a good tool but it doesn't work too)
Mel
Commented on 29.January 2011
Agree with the above. We could really help you improve this great tool (and probably make it work for a wider audience).

I've been trying to use it in my win7 VS2010 box to no avail. it works on my winxp VS2008 though.
Cory Plotts
Commented on 10.February 2011
@Tony:
Snoop does work for WPF 3.5/4.0 and x86/x64 ... just make sure that you have the latest version at http://snoopwpf.codeplex.com.

If you have grabbed the version from Pete Blois' site ... that one ONLY works for WPF 3.5 and x86.
Tony
Commented on 24.February 2011
@Cory Plotts
The latest version works... sometimes... (many times I can't snoop into the application, the "Snoop this application" button doesn't do anything, the "Magnify" button is working)
and when I successfully Snoop the application, Snoop is stuck at the ContentPresenter of the main window, I can't "snoop" into my injected view (my project use CAB/SCSF)
jhon
Commented on 3.March 2011
hallo,,,,i jhon IT student, can u pls help me to develop my thesis,
using wpf, pls view me some sample or give me some sites that can
help me in developing may programm..thanks..

Rohatash
Commented on 11.March 2011
nice work
Borislav Ivanov
Commented on 11.March 2011
Great work with this new release!
I hit a small problem:
I have two running 2 WPF applicaions and choose to attach to one of them, but WPF Inspector attaches to the other one:
- .NET 4.0 64-bit (this is Metro Twit)
- .NET 3.0 32-bit (this is my app, that I cannot attach to)

If I stop the Metro Twit, I can succesfully attach to my app.
edgar
Commented on 17.March 2011
I just realized that if I put a disabled button to register the application unless you enter a valid serial, you can enable that button easy. 0_o
Great application!
suresh ramasamy
Commented on 23.March 2011
It is very usefull for me..
I learn wpf basic easily..this is great.
Christian Moser
Commented on 23.March 2011
Hi Borislav,
the problem has been fixed in version 0.9.8. You can download it directly from codeplex.
Aly
Commented on 23.March 2011
Really a gud site for WPF learners..
Debashish...
Commented on 29.March 2011
It's great site who are working on WPF for the first time .
Girish K
Commented on 13.April 2011
It's good site for Beginner who are working on WPF
Jane
Commented on 14.April 2011
Mole is another great way to visualize WPF apps, they just put out Mole 2010 and it's really awesome for what I'm doing with WPF at work.
www.molosoft.com
tauqir
Commented on 16.April 2011
Very handy tool ,,, more features than snoop....

One Suggestion : The Main Inspector should not exit when we close the application we are inspecting. We have to rerun inspector every time we want to inspect.
Hope to see this in future release.
Tobias
Commented on 18.April 2011
Hello Christian.
your Tool is very nice.
But, it is not possible to read complete Text of Errors, if they are very long. It is not possible to scroll, or rightclick to copy text to clipboard.
It would be very nice and good to have this feature.

Greets

Tobi
Rohit
Commented on 29.April 2011
Hi,

WPF Inspector is an awesome stuff for a wpf developer. But i'm facing an issue with it.

can you provide any work around for this - http://stackoverflow.com/questions/5831354/cannot-add-geometrydrawing-to-drawinggroup

Thanks,
shankar
Commented on 3.May 2011
Sir please give demo video how to work on this? i am not able to know this one.Its showing empty.
Thomaz
Commented on 17.June 2011
Very promissins concept, I've been looking for something like this for some time.
But I'm having trouble attaching it to my application. Seems like no matter which application I select in the Attach box WPF inspector always attaches to itself.
Sai Govind.N.K
Commented on 19.July 2011
Good
Rodrigo
Commented on 14.August 2011
... Show de Bola!!
Tamas
Commented on 26.September 2011
Really helpful resource

Name
E-Mail (optional)
Comment