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
24
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
Other Decks in Programming
See All in Programming
Next.js: The final boss of Web Performance
guaca
0
260
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
AWSに止められる覚悟してますか?
morizo_1984
2
540
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
AmebaブログはKMPから卒業します
kmars0605
0
190
APNsからLive Activityを開始する話
yumnumm
0
170
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
ジョジョの世界をXRで再現する
mofurune
0
170
Workers Cache を知る
syumai
0
370
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Design in an AI World
tapps
1
350
Git: the NoSQL Database
bkeepers
PRO
433
67k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Ethics towards AI in product and experience design
skipperchong
2
430
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
Designing for Performance
lara
612
70k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Speed Design
sergeychernyshev
33
2.2k
Transcript
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