Upload
dvoituron
View
178
Download
2
Embed Size (px)
Citation preview
Visual Studio 2015
Denis Voituron.Net Software Architect
Increasingyour productivity
[email protected] www.dvoituron.be @denisvoituron
About me
Denis Voituron
Civil engineer (Mons)
Company founder
Developer: VB3, VB.Net, C#
.Net Software Architect (Trasys)
Blogger
• Code Like a Ninja• Intellisense• Shortcuts• Windows• Refactoring
• Debugging Tips and Tricks• Breakpoints• Debugger Visualizers• Exceptions to simplify debugging• Intellitrace
Agenda
• Editor• Quick Launch• Block Selection
• Intellisense• Camel Case Filter• Pascal Case Filter
• Start Page• Project Pinning• Project Removal• Windows Task Bar• Completely Redone
Code Like a Ninja
• Code Editor• Navigate To Ctrl + ,• Resolve a unknown namespace Ctrl + ;• Go To Definition F12• Peek Definition Alt + F12• Find All Ref. Shift + F12• Code Lens• Highlighting• Paste XML/JSON As Classes
• Go Back Ctrl+ -• Go Forward Ctrl + Shift + -• Zoom Ctrl + MouseWheel
Code Like a Ninja
• Windows• Architecture• Multiple Monitors Win + Arrow• Floating Windows
• Regions• Collapse or Expand Ctrl + M, M• Collapse All Ctrl + M, O• Expand All Ctrl + M, L• Hide Ctrl + M, H
Code Like a Ninja
• Comments• Comment Selection Ctrl + K, C• Uncomment Selection Ctrl + K, U
• Extensions• Extension Manager• Online Gallery• Easy to disable or uninstall DevEnv.exe /
SafeMode
• Example : Web Essentials
Code Like a Ninja
• Refactoring• Extract Interface Ctrl + R, I• Extract Method Ctrl + R, M• Rename Variables, Methods, … Ctrl + R, R• Encapsulate Field to a Property Ctrl + R, E
• Quick Actions Ctrl + ;
• Snippet• Code Snippet Picker Ctrl + K, X
Surround with Snippet Ctrl + K, SExtension Snippet Designer
Code Like a Ninja
• DebugVisualizer• BreakPoint (F9)• Traces Pinnable• Changes in Red color• PerfTips
Debugging Tips and Tricks
• DebuggerVisualizer• Default Visualizers• Text / Html / Xml / Json• WPF• DataSet / DataTable
• DialogDebuggerVisualizer• Create a DLL (target must be Serializable)• Copy to <VSDir>\Common7\Packages\Debugger\Visualizers
Debugging Tips and Tricks
• Exceptions Dialog Box (Ctrl-Alt-E)• Check to throw exceptions
Debugging Tips and Tricks
int result = 0;int zero = 0;
try{ result = 10 / zero;}catch (DivideByZeroException){
}
• Conditional BreakPoint• Break when the code meets a condition
• Display the Call Stack
Debugging Tips and Tricks
• System.Diagnostics.Debugger• Conditional BreakPoint is very slow
Debugging Tips and Tricks
int numberOfElements = 10000;
for (int i = 0; i < numberOfElements; i++){ if (Debugger.IsAttached && i == numberOfElements - 2) Debugger.Break();}
• Debugger Attributes
• [DebuggerDisplay("{X}, {Y}, {Z}")]
• [DebuggerBrowsable(DebuggerBrowsableState.Never)]
• [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
Debugging Tips and Tricks
• IntelliTrace & Diagnostic Tools• BlackBox Recorder• Enable IntelliTrace
via "Options / IntelliTrace"
• Memory, CPU, Traces• Time Frame, Duraction
• StandAlone IntelliTrace• http://bit.ly/1JQJc68
Debugging Tips and Tricks
Visual Studio 2015
http://[email protected]
References
• Channel9: bit.ly/1Gykh6q• Visualizer: bit.ly/1IVclOj• Poster: bit.ly/1cepvrl