6

WPF 3.5 has PresentationTraceSources for diagnostics and WPFPerf for performance and data binding diagnostics.

Are there equivalent tools / libraries for Silverlight?

Richard Szalay
  • 83,269
  • 19
  • 178
  • 237

4 Answers4

4

Although I've marked Paully's answer as "the answer", I thought I'd summarise what I've found so far.

Performance:

Diagnostics:

  • Silverlight Spy can view live XAML DOM
  • Data Binding tracing cannot be configured since the code does not use trace switches/sources. Binding errors are written directly to Trace.Write and the WPF SourceUpdated/TargetUpdated events are not available in Silverlight.
Richard Szalay
  • 83,269
  • 19
  • 178
  • 237
1

I don't think it's as robust as WPF but here is some things you can do.

Paully
  • 582
  • 5
  • 12
  • Interesting. It looks like XPerf is quite good for performance troubleshooting. Is there anything available for troubleshooting data binding? – Richard Szalay Sep 26 '09 at 17:00
  • For data binding, I usually monitor my Immediate window for data binding errors. Is there something specific you are looking for in databinding troubelshooting? – Paully Sep 27 '09 at 06:59
  • The two examples I can think of would be a OneWay binding being removed because the property was directly assigned, and the situation outlined by this article (WPF): http://blog.wouldbetheologian.com/2009/07/why-wpf-databinding-is-awful-technology.html – Richard Szalay Sep 27 '09 at 10:03
1

Right, so while I'm certain that possessing a myriad of perf diagnostics tools is fun, what exactly are you trying to accomplish?
Looking at WPF diagnostics tools you've mentioned I could only think "pffff, so what? These are useless 99.999% of the time". Most of that data is fairly useless when it comes down to actually debugging a real world app. Those tools are mostly relevant when debugging the WPF framework itself IMO.

It's definitely true that there's a shortage of good diagnostics tools for some issue in Silverlight.
For instance, there are 0 Silverlight commercial memory profilers out there. But beyond that, I'm unsure as to why you need more than those. So, which tools exactly do you need?

Now that I'm done being smug and uplifting (all at the same time), I'll call out 2 tools you've missed:

  1. Silverlight SOS (Son-Of-Strike) extension: Works just like the desktop SOS extension but with a few more extra commands and you'll have to load a silverlight specific sos.dll. This tool is excellent for in-depth memory profiling, learn more about it here and here.
  2. The Silverlight3 Analytics class. Using this class you can get the CPU% for your process, the whole CPU usage and the specific model and make for the GPU card.
  3. Glimpse for Silverlight - A DataBinding debugging "tool"/control by Karl Shifflett.
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
JustinAngel
  • 16,082
  • 3
  • 44
  • 73
  • If you'd read the question and my comments on previous answers, you'd see that the main outstanding area in my queries is troublshooting databinding issues. On the other hand, thanks for pointing out the Analytics class and the SOS Silverlight commands. – Richard Szalay Sep 28 '09 at 16:08
  • Gotcha, added a 3rd bullet point on a tool used to debug DataBinding failures. – JustinAngel Sep 28 '09 at 23:05
  • Glimpse looks great. Any chance we'll be seeing more of these kind of tools included in the Silverlight SDK in the future? – Richard Szalay Sep 29 '09 at 09:22
0

Here is how you can use Silverlight to profile managed code using ETW.

How to profile a silverlight application?

Community
  • 1
  • 1
Naveen
  • 4,092
  • 29
  • 31