views:

38

answers:

1

is it possible to get snoop to profile WPF Windows launched from WinForms app?

A: 

Yes it is. Snoop can easily be used with WPF Windows launched from a WinForms app. Specifically, Snoop will:

  1. Offer to let you select any process that loads PresentationFramework.dll and that doesn't contain "devenv" in its name.
  2. Actually let you to snoop or magnify any process that meets the conditions in #1 and also has at least one active PresentationSource (such as an open Window or an ElementHost) in its default AppDomain.

Note that when Snoop first attaches to a process it displays Application.MainWindow, or if that isn't set, the first PresentationSource registered that is still showing. This doesn't stop you from snooping other WPF content, however: Just place the mouse over the WPF content you want to snoop and hit Ctrl+Shift.

Nitpick: What Snoop does isn't actually called "profiling." "Profiling" means measuring what methods are called and how much time is spent in them. So to be very precise the answer is "no," but I doubt you were really asking about profiling.

Ray Burns
thanks again Ray. So basically when i run snoop on my WinForms/Wpf form, it doesn't give me anything. The window just doesn't pop up. In my test app, i have a WPF project, and a WinForms project used to launch the WPF window. It doesn't seem to catch on, that there is WPF behind the startup Form...
Sonic Soul
turns out i was just using outdated version of snoop. the new 4.0 version supports what i need ..
Sonic Soul