16
A Great Clash of Symbols Managing and Using Symbol Files for .NET Applications Presented by Gregory M. Sohl

A great clash of symbols

Embed Size (px)

DESCRIPTION

Slides from a presentation on managing Windows debugging symbols files.

Citation preview

Page 1: A great clash of symbols

A Great Clash of Symbols

Managing and Using Symbol Files

for .NET Applications

Presented by

Gregory M. Sohl

Page 2: A great clash of symbols

Agenda

Symbols

Visual Studio Symbol Usage

Other Tools Symbol Usage

Places to Store Symbols

Keeping Symbols with NuGet Packages

Page 3: A great clash of symbols

Symbols

Produced by .NET compilers

Stored in PDB files

Contain – much less than for native Source file names Line # references Local variable names Only the info that is not already contained in

managed assemblies

Page 4: A great clash of symbols

Symbol File Creation

Created at compile time

A unique GUID is embedded with each compile In the assembly In the PDB

Mismatched assembly + PDB

Page 5: A great clash of symbols

Kinds of Symbol Files

Private / Debug Debug Info = full Full debugging experience

Public Debug Info = pdb-only Examine stack traces, dumps, Intellitrace

Generally, don’t do “full” for release builds due to performance hit

Page 6: A great clash of symbols

Keeping Symbol Files

Symbols are as important as source! Use with dumps from QA/production Use with Intellitrace from QA/production

Without matching Symbols files, working with either much more difficult

Page 7: A great clash of symbols

What to Keep

Local developer builds?

Builds released to QA?

Builds released to production?

Builds released to customers?

NO

YES

YES

YES

Page 8: A great clash of symbols

How VS Finds Symbols

It uses a search path Folder relative to the binary

c:\MyDir\symbols\dll

c:\MyDir\dll

c:\MyDir

Configured paths, cache and Symbol Server Environment Variable: _NT_SYMBOL_PATH Tools / Options / Debugging / Symbols

List of Search Paths

Page 9: A great clash of symbols

Supported Search Paths

Local drives

Network drives

Symbol server Ex. srv*http://msdl.microsoft.com/download/symbols

Local cache (highly recommended) Ex. cache*c:\MySymbols;

Page 10: A great clash of symbols

Simple Search Path Setup in VS

Page 11: A great clash of symbols

DEMOVS DEBUGGING

Page 12: A great clash of symbols

Other Tools Symbol Usage

WinDbg / SOS – Low level debugger

Intellitrace – Runtime event recorder

Page 13: A great clash of symbols

Keeping Your Symbols

Application & Library Symbols Store them with your release on a file share Copy them back into place as needed for

debugging

Page 14: A great clash of symbols

Keeping Your Symbols

Put them on a Symbol Server symstore – part of the Windows SDK

Reference stored symbols via file path SymbolSource.Server.Basic

http interface to symstore

Stores NuGet packages & symbols

bit.ly/SymbolSourceServerBasic NuPeek

Stores NuGet packages & symbols

https://bitbucket.org/thinkbeforecoding/nupeek

Page 15: A great clash of symbols

Keeping Your Symbols

TFS Build System Can store source, binaries and symbols Good blog post:

http://bit.ly/TFSSourceSymbols

Page 16: A great clash of symbols

My Goal

Move from CruiseControl.NET to TFS Builds

Use TFS Build Management For

Binaries

Symbols On

All QA Builds with retention for 2-3 months

All Release Builds with retention as long as they are in use.