Silverlight debugging
Download
1 / 33

Silverlight Debugging - PowerPoint PPT Presentation


  • 152 Views
  • Uploaded on

Silverlight Debugging. Alan Cobb Independent .NET Consultant Alan Cobb & Associates, Inc. Sacramento, CA Silicon Valley Code Camp 2008 Saturday, November 8, 2008, 3:45pm. About Alan Cobb. Independent consultant for over 20 years on Microsoft platforms Silverlight, WPF, .NET, C#, C++

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Silverlight Debugging' - tab


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Silverlight debugging

Silverlight Debugging

Alan Cobb

Independent .NET Consultant

Alan Cobb & Associates, Inc.

Sacramento, CA

Silicon Valley Code Camp 2008

Saturday, November 8, 2008, 3:45pm


About alan cobb
About Alan Cobb

  • Independent consultant for over 20 years on Microsoft platforms

  • Silverlight, WPF, .NET, C#, C++

  • One of directors of the SacDotNet User Group

  • http://www.alancobb.com

  • http://www.alancobb.com/blog


Another code camp session
Another Code Camp Session

  • “WCF Debugging – Where Do I Start”

    • Presented by: Petar Vucetin

    • 9:15AM Sunday: Room 4204

  • See also Web Service debugging section of Silverlight documentation:

    • “Debugging Services for Silverlight Applications”


Presentation overview
Presentation Overview

  • Beginning:

    • Setting up VS2008 for SL debugging

    • Alternatives for SL tracing

  • Intermediate:

    • SL debugging tools: Fiddler, Silverlight Spy

  • Advanced:

    • Performance debugging

    • SOS extension: Low level .NET debugging


Description on website
Description on Website

  • This session will survey a range of Silverlight 2 debugging tools and techniques. At the beginner level we’ll review setting up VS2008 for debugging Silverlight C# and JavaScript code. Then we’ll look at different techniques for trace logging. At an intermediate level we’ll cover three debugging tools I use extensively: Fiddler, Silverlight Spy and NetLimiter. At the advanced level we’ll do some low-level Silverlight .NET debugging with WinDbg and the SOS debugger extension DLL. SOS helps you hunt for memory leaks by giving you a detailed view of the managed heap. Stack traces from SOS can sometimes reveal more about the context of bugs than VS2008 can.


Beginning level issues
Beginning Level Issues :

  • Setting up VS 2008 for SL debugging:

    • Know where the settings are

    • Turn on 1st chance exception handling

  • Alternatives for Tracing in SL:

    • Debug.WriteLine and DebugView

    • Clog for Silverlight


Setting up vs2008
Setting up VS2008

  • Use a Web Application Project

  • Turn on 1st chance exception handling

  • Where are the settings?

    • VS itself, Your project, Web.config, Internet Explorer

  • Types of breakpoints:

    • JS, .NET client and server side




Which code running where
Which code? Running Where?

Client:

Server:

Managed: C#

Managed: C#

Your SL code:

Your Web-Service code:

Managed: C# / VB

JavaScript

Managed: C# / VB

Silverlight itself:

.NET framework:

Un-managed: C++

Un-managed: C++


Main silverlight dlls
Main Silverlight DLLs



Sl tracing debugview
SL Tracing: DebugView


Sl tracing debugview1
SL Tracing: DebugView



Fiddler
Fiddler

  • What is it?

    • HTTP proxy server

  • What can you do with it?

    • Watching browser talk to Silverlight sites

    • Debugging cross domain policy file issues

    • Timing analysis (slow connection tests)





Fiddler demo little loader app
Fiddler Demo: Little Loader App




Silverlight spy
Silverlight Spy

  • How is Silverlight Spy constructed?

  • Features:

    • Browse Silverlight element tree

      • Fly over element tree

      • See element statistics

      • Copy XAML for a given branch

    • Modify element properties interactively

    • Other



Debugging performance issues
Debugging Performance Issues

  • SeemaRamchandani’sPDC2008 talk

  • FrameRate:

    • Host.Settings.MaxFrameRate

    • Host.Settings.EnableFrameRateCounter

    • CompositionTarget.Rendering event

  • Host.Settings.EnableRedrawRegions

  • Profiling:

    • Xperf ? (A free “profiler” from MS)




Sos low level net debugging
SOS: Low-level .NET Debugging

  • What is SOS?

    • Extension DLL for WinDbg debugger

  • Downloading WinDbg setting up SOS

    • Intro articles on Silverlight and SOS: 1, 2

    • Pointing at Microsoft symbol server

  • What can you use it for?

    • Examine Silverlight’s managed heap

    • Get more detailed stack traces







ad