Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Debugging with Visual Studio
Search
GBPhilip
January 08, 2019
Programming
26
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Debugging with Visual Studio
The debugging features of Visual Studio 2017
GBPhilip
January 08, 2019
Transcript
58 slides
DEBUGGING By Philip Sutton
WHO AM I • Started full time work 1991 •
Worked for Science, Travel, Management Consultancy, Finance, Medical, Education • Programmed in COBOL, Fortran, Visual Basic 6, VB.net and C# as well as Sql • C# since 2005 • Twitter @GBPhilipSutton
INTRODUCTION • Visual Studio Options • Debugging Attributes • Datatips
• Debugging Windows • Dumps • Symbol Servers • Front End • Enterprise Features
VISUAL STUDIO OPTIONS • Debugging Options • Exception Options
DEBUGGING OPTIONS
EXCEPTION OPTIONS
EXCEPTIONS SETTINGS • Demo
DEBUGGING ATTRIBUTES • Debugger Display • Debugger Browsable • Debugger
Type Proxy
DEBUGGERDISPLAY
DEBUGGERDISPLAY • [DebuggerDisplay("Name = {Name}")] • public class Person •
{ • public string Name { get; set; } • public int Age { get; set; } • }
DEBUGGERDISPLAY
DEBUGGERBROWSABLE • public class PersonBrowse • { • public string
Name { get; set; } • public int Age { get; set; } • [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] • public Address Address { get; set; } • }
DEBUGGERBROWSABLE
DEBUGGERBROWSABLE • Never
DEBUGGERDISPLAY • RootHidden
DEBUGGER PROXY TYPE • Allows the significant and fundament change
on the debugging view of a type. • Demo
DEBUGGER VISUALISERS • Some built in – xml, json, text,
html • Many in the market place • Write your own
DATATIPS
DEBUGGING WINDOWS - LOCALS/AUTO
DEBUGGING WINDOWS - CALL STACK
DEBUGGING WINDOWS - WATCH WINDOW
MULTI-THREADED APPLICATIONS • Thread Window • Debug Toolbar • Debug
Location • Parallel Stacks • Parallel Watch
MULTITHREADED DEBUGGING WINDOWS - THREADS
MULTITHREADING WINDOWS – DEBUG TOOLBAR
MULTITHREADING WINDOWS DEBUG LOCATION
MULTITHREADING WINDOWS PARALLEL STACKS • private static void ParallelExample() •
{ • var names = new List<string> {"Bob", "Judy", "Chris", "Ashley"}; • Parallel.ForEach(names, (name) => • { • for (var i = 0; i < 10; i++) • { • Console.WriteLine($"Hello {name} {i}"); • } • }); • }
MULTITHREADING WINDOWS PARALLEL STACKS
MULTITHREADING WINDOWS PARALLEL WATCH
BREAKPOINTS • Data Breakpoints • Condition • Hit Count •
Filter • When hit • Break at Function
BREAKPOINTS DATA
BREAKPOINTS CONDITIONAL BREAKPOINTS
BREAKPOINTS CONDITIONAL
BREAKPOINTS CONDITIONAL • private static void ConditionalBreakpoints() • { •
for (var i = 0; i < 10; i++) • { • if (i==5) • { • Debugger.Break(); • } • Console.WriteLine($"The value is {i}"); • } • }
BREAKPOINTS CONDITIONAL • private static void ConditionalBreakpoints() • { •
for (var i = 0; i < 10; i++) • { • if ((Debugger.IsAttached) && (i==5)) • { • Debugger.Break(); • } • Console.WriteLine($"The value is {i}"); • } • }
BREAKPOINTS HIT COUNT
BREAKPOINTS HIT COUNT
BREAKPOINTS FILTER
BREAKPOINTS FILTER
BREAKPOINTS WHEN HIT
BREAKPOINTS WHEN HIT
BREAKPOINTS BREAK AT FUNCTION
ADDRESS LEVEL DEBUGGING • Memory • Disassembly • Registers
WPF/UWP • Live Visual Tree • Live Property Explorer
WPF/UWP VISUAL TREE/ PROPERTY EXPLORER
DUMPS
DUMPS
SYMBOL SERVERS • The symbol server enables the debuggers to
automatically retrieve the correct symbol files without product names, releases, or build numbers.
FRONT END • Javascript • Browser Link • Sync •
Inspector
ENTERPRISE • Code Maps • Intellitrace
ENTERPRISE CODE MAPS
ENTERPRISE INTELLITRACE
ENTERPRISE INTELLITRACE
ENTERPRISE INTELLITRACE
ENTERPRISE INTELLITRACE
ENTERPRISE INTELLITRACE
OTHER DEBUGGING ITEMS • Remote Debugging • Azure Debugging •
Live Sharing • WinDbg • SOS
REFERENCES • https://docs.microsoft.com/en-us/visualstudio/debugger - general debugging • https://docs.microsoft.com/en-us/visualstudio/debugger/general- debugging-options-dialog-box?view=vs-2017 debugging
options • https://www.wintellect.com/pdb-files-what-every-developer-must-know/ pdb files • https://blogs.msdn.microsoft.com/jaredpar/2011/03/18/debuggerdisplay- attribute-best-practices/ (old) debugger display best practices • https://blogs.msdn.microsoft.com/visualstudio/2017/06/26/7-lesser-known- hacks-for-debugging-in-visual-studio/
QUESTIONS
Other Decks in Programming
See All in Programming
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
710
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
440
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
240
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
Compiling Your Language to WasmGC & Friends
tanishiking
0
780
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
Apache Airflow Introduction
leew
1
100
Featured
See All Featured
Between Models and Reality
mayunak
4
610
How GitHub (no longer) Works
holman
316
150k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Facilitating Awesome Meetings
lara
57
7.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
340
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
Faster Mobile Websites
deanohume
310
32k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
320
Tell your own story through comics
letsgokoyo
1
1.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
30 Presentation Tips
portentint
PRO
1
480
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
650