Reactive Extensions (Rx) Explained Presenter: Kevin Grossnicklaus August 5 th, 2011.
Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow
description
Transcript of Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow
![Page 1: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/1.jpg)
![Page 2: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/2.jpg)
Visual Studio.NET: Tips, Tricks, & Toys
by Kevin GrossnicklausArchitectNow
![Page 3: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/3.jpg)
![Page 4: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/4.jpg)
Agenda Introduction General Tips Code Editor Tricks Searching Layout and Navigation Advanced Design-Time Tips Debugging Tips VS.NET Plug-Ins External Development Tools Additional Resources Questions?
![Page 5: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/5.jpg)
Introduction Kevin Grossnicklaus
o ArchitectNow- www.ArchitectNow.net (2009-Present)• President
o Washington University - CAIT Program (2003-Present)• Instructor
o SSE - www.SSEinc.com (1999-2009)• Chief Architect• Software Development Practice Leader
Email: [email protected]
![Page 6: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/6.jpg)
Expectations What are we going to cover? Why is this something I should be aware of? Who can use this stuff? How detailed are we going to get?
![Page 7: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/7.jpg)
GENERAL TIPS
![Page 8: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/8.jpg)
Managing Shortcuts Keyboard vs. Mouse
Verify your current environment settingso This talk assumes “General Development”
Manage keyboard shortcuts here:o Tools->Options->Environment->Keyboard
All settings (including shortcuts) can be imported and/or exported from:o Tools->Import and Export Settings
![Page 9: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/9.jpg)
Keyboard Shortcuts Standard Shortcuts:
o Ctl-Ko Ctl-Shift-O
“Chords” = Two character shortcutso Written as:
• Ctl-K,D or Ctl-K, Ctl-D
![Page 10: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/10.jpg)
Shortcut Reference Posters C# 2008
o http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&displaylang=en
Visual Basic.NET 2008o http://www.microsoft.com/downloads/details.aspx?familyid=255b8cf1-f6bd-4b55-bb42-
dd1a69315833&displaylang=en
![Page 11: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/11.jpg)
Top Level Shortcuts Ctl-Shift-N = New Project Alt-Shift-N = New Website Ctl-Shift-O = Open Project Alt-Shift-O = Open Website Ctl-Shift-A = Add New Item Alt-Shift-A = Add Existing Item
![Page 12: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/12.jpg)
CODE EDITOR
![Page 13: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/13.jpg)
Cut/Copy/Paste Copy or Cut = Ctl-C or Ctl-X (respectively)
o If no selection, cuts or copies the current line to the clipboardo If there is a selection, cuts or copies the selection to the clipboard
• Tools->Options->Text Editor->All Languages->General• Uncheck the “Apply Cut or Copy Commands to Blank Lines When There is No
Selection” option Current Line
o Ctl-L to cut the current line to the clipboard (including EoL)o Ctl-Shift-L to delete the current line
![Page 14: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/14.jpg)
Cut/Copy/Paste (Cont.) Paste = Ctl-V
o Pastes the last item cut or copied into the editor at the current cursor location Clipboard “Ring” = Ctl-Shift-V
o Cycles through the previous 20 items cut to the clipboard and pastes them at the current cursor location
o Accidentally cut or copy something you didn’t mean to? • Cycle through pasting until you get to the item you overwrote
![Page 15: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/15.jpg)
Misc Selection/Insertion Commands Ctl-Enter to insert a blank line above current line Ctl-Shift-Enter to insert a blank line below current line Ctl-W to select current word Ctl-Delete to delete next word Ctl-Backspace to delete previous word
![Page 16: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/16.jpg)
Drag/Drop Code Selections of code can be dragged around a code file or to different files
o Left click to cut/pasteo Right click to be prompted to Move or Copy
Code can be dragged onto the Toolbox dock-window in the “General” section and then dragged back onto other editorso These can be renamed to be more readableo This is a handy way to reuse sections of code
![Page 17: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/17.jpg)
Weird Editor Shortcuts Ctl-T to transpose a character Ctl-Shift-T to transpose a word Alt-Shift-T to transpose a line Ctl-U to make current selection or character lowercase Ctl-Shift-U to make current selection or character uppercase
![Page 18: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/18.jpg)
Undo/Redo Ctl-Z to Undo Ctl-Y to Redo Use the dropdowns for more granular control and information
![Page 19: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/19.jpg)
Scrolling Use the scroll bars or mouse wheel Press mouse wheel to allow for 4-way navigation
![Page 20: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/20.jpg)
“Go-Back” Markers and Navigation What is a “Go-Back” marker? Ctl-Minus to navigate backwards Ctl-Shift-Minus to navigate forwards Optionally use the toolbar buttons and dropdown boxes for more info
![Page 21: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/21.jpg)
Navigation Bar What is the navigation bar? Ctl-F2 to select the navigation bar Tab or Shift-Tab to switch between combo boxes once selected Arrow keys to navigate down and enter to select To enable/disable per language:
o Tools->Options->Text Editor->All languages (or specific language)->Generalo Set the “Navigation Bar” option
![Page 22: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/22.jpg)
Splitting Editor Windows Window->Split to split Window->Remove Split to remove Splitter can be resized via mouse F6 to switch between split panes
![Page 23: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/23.jpg)
Line Numbers Enable line numbers here:
o Tools->Options->Text Editor->All languages (or specific language)->Generalo Check “Line Numbers”
![Page 24: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/24.jpg)
Track Changes Tools->Options->Text Editor->General
Check “Track Changes” What does this do?
Yellow – Lines were edited since last save. Green – Lines were edited prior to last save.
Yellow becomes Green after one save, close and re-open a file and Green is gone
![Page 25: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/25.jpg)
Code Selection Click and drag to select code via the common “stream” mode Hold Alt-Shift and click and drag to select in “box” mode Shift-Arrow Keys to manually select code in “stream” mode Alt-Shift-Arrow Keys to manually select in “box” mode
![Page 26: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/26.jpg)
Formatting What does code formatting do? Where can I adjust the settings?
o Tools->Options->Text Editor->(Language)->Formatting Ctl-K,D to format the current document Ctl-K,F to format the current selection
![Page 27: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/27.jpg)
Outlining Ctl-M,M to toggle outlining around cursor Ctl-M,L to toggle all outlining in current file Ctl-M,P to turn off outlining Edit->Outlining->Start Automatic Outlining to turn back on Ctl-M,O to collapse to definitions Selecting a collapsed definition allows you to cut and paste it as a whole
![Page 28: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/28.jpg)
Remove Unused Usings Right click in editor and select:
o Organize Usings->Remove Unused Usings
![Page 29: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/29.jpg)
Bookmarks Ctl-K,K to toggle bookmarks on current line Ctl-K,N to go to the next bookmark Ctl-K,P to go to the previous bookmark Ctl-K,L to clear all bookmarks Ctl-K,W to view the bookmarks window Organizing Bookmarks
![Page 30: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/30.jpg)
Commenting Handy Shortcuts:
o Ctl-K,C = Comment Blocko Ctl-K,U = Uncomment Block
XML Comments Task List Comments
o //TODOo //HACKo //UNDONE
![Page 31: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/31.jpg)
Intellisense Ctl-J to invoke statement completion (i.e. bring up Intellisense) Ctl-Space or Alt-Right Arrow for statement completion
![Page 32: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/32.jpg)
Smart-Tags Ctl-Period to drop down a Smart-Tag menu
o Enter to select the first item Resolve Context Menu
![Page 33: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/33.jpg)
Code Snippets Ctl-K,X to bring up Code Snippet menu
o Type-ahead supportedo Or enter the snippet shortcut keyword and press Tab-Tab
Ctl-K,S to insert a code snippet around a selected block of code Tab and Shift-Tab to switch between “tokens” Ctl-K,B to bring up the Code Snippet Manager
![Page 34: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/34.jpg)
Refactoring Ctl-R,R to rename current item Ctl-R,M to extract the currently selected code into a new method Ctl-R,E to encapsulate field into a property Ctl-R,I to extract interface from current class Ctl-R,P to promote selected local variable to a parameter Ctl-R,V to remove parameters Ctl-R,O to reorder parameters
![Page 35: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/35.jpg)
SEARCHING
![Page 36: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/36.jpg)
Searching - 1 Incremental Search
o Ctl-Io Start typingo Ctl-I again to jump to next occurrence
Current Word Searcho Ctl-F3 to search for the currently selected wordo Ctl-Shift-F3 to search for the current word looking backwards
Quick Findo Ctl-F to bring up Quick Find with current word as the default
![Page 37: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/37.jpg)
Searching - 2 Quick Replace
o Ctl-H brings up the Quick Replace window with the current word as the default Find Symbol
o Alt-F12 brings up the Find Symbol dialogo Shift-Alt-F12 searches for the current word using the Find Symbol functionality but
skips the UI
![Page 38: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/38.jpg)
Searching - 3 Find in Files
o Ctl-Shift-F opens the Find in File dialog Replace in Files
o Ctl-Shift-H opens the Replace in Files dialog Find in Files options
![Page 39: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/39.jpg)
LAYOUT AND NAVIGATION
![Page 40: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/40.jpg)
Document Windows Document Windows = Tabbed Documents Ctl-Alt-Down Arrow to drop down file tab channel Tab Context Menu
o Close All But Thiso Copy Full Patho Open Containing Folder
Tab Groupso Horizontal or Vertical
Windows Menu
![Page 41: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/41.jpg)
Document Navigation Ctl-Tab to display the IDE navigator
o Ctl-Tab again to scroll through open documentso Ctl-Shift-Tab to scroll in reverseo Arrow keys or mouse to select a document or dock-window
Ctl-F6 and Ctl-Shift-F6 to jump between currently open documents without using the IDE navigator (forwards and backwards)
Ctl-F4 to close the current document
![Page 42: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/42.jpg)
Dock/Tool Windows Docking Targets Five “States”
o Dockableo Floatingo Tabbedo Hideo Auto-Hide
Alt-F7 and Alt-Shift-F7 to scroll (forwards or backwards) through all opened tool windows using the IDE navigator
Alt-F6 and Alt-Shift-F6 to scroll (forwards or backwards) through all opened tool windows without the navigator
![Page 43: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/43.jpg)
Dock/Tool Windows (Cont.) Tool windows that are hidden can be shown via their shortcut key or most are
found under one of the following menu locations:o Viewo View->Other Windowso Debug->Windows
![Page 44: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/44.jpg)
Window Layouts Four Layouts:
o Design Viewo Full Screeno Debugging Viewo File View
Shift-Alt-Enter to toggle between Full Screen mode and Design View
![Page 45: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/45.jpg)
Toolbars Drag and drop customization Visible based on current context Right click to display any toolbar at any time Customization dialog
o “Show Shortcut Keys in Screen Tips”o Full customization of all toolbars while this dialog is visible
![Page 46: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/46.jpg)
Context Menu Customization Complete editing of any context menus
• Tools->Customize• Select Toolbars tab• Check “Context Menus”
![Page 47: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/47.jpg)
ADVANCED DESIGN TIME TIPS
![Page 48: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/48.jpg)
Output Window Right click to disable unnecessary messages
![Page 49: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/49.jpg)
Command Window Ctl-Alt-A to open the command window Enter a > to run any VS command from the command prompt
o Full Intellisense for commands, arguments, and even file pathso Command aliasing
• ? = Debug.Print• Enter “alias” by itself to see current aliases
![Page 50: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/50.jpg)
Task Window Custom Tasks Task Shortcuts Comment Tasks
![Page 51: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/51.jpg)
External Tools How to add external tools?
o Redirecting console output to Output Windowo Passing arguments
![Page 52: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/52.jpg)
Find Combo Box Ctl-/ to open the Find Combo Box with a “>” entered for you Once in the Find Combo Box enter a “>” and you can run any VS command with
the same Intellisense as the Output Window Enter a function name in the Find Combo Box and press F9 and a breakpoint will
be set on that function
![Page 53: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/53.jpg)
Code Definition Window Ctl-\,D to show the Code Definition Window This window is a read-only source view of any symbol currently selected in the
live editor. o Code can be copied from this windowo Breakpoints can be set
![Page 54: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/54.jpg)
Object Test Bench Opened via View->Other Windows->Object Test Bench Instantiate new instances of classes or call static methods to do quick testing
(without writing test code) Can also be reached via:
o Class View tool windowo Class Diagram designer
Right-click on a class in either of the above and select either:o Create Instanceo Invoke Static Method
![Page 55: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/55.jpg)
DEBUGGING
![Page 56: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/56.jpg)
Common Shortcuts F5 to start debugging Ctl-F5 to start without debugging F11 to step into the current line F10 to step over the current line Shift-F5 to stop debugging
![Page 57: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/57.jpg)
Breakpoints F9 to toggle a breakpoint
o Or, simply click in the left border of the code editor Ctl-Shift-F9 to delete all breakpoints Ctl-B to show Break at Function dialog
![Page 58: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/58.jpg)
Breakpoints - Advanced Breakpoint Context Menu
o Locationo Conditiono Hit Counto Filtero When Hit
![Page 59: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/59.jpg)
Next Statement Manipulation Yellow arrow = “NEXT” statement to execute Can be dragged to new location
o Within Limitso Be careful
![Page 60: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/60.jpg)
Debugging Threads Ctl-Alt-H brings up the Threads tool window At breakpoints all threads break together Threads can be frozen/thawed from the Threads tool window
o This keeps them paused when execution continues Threads toolbar also exposes functionality
![Page 61: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/61.jpg)
Break On All Exceptions Ctl-Alt-E to bring up Exceptions dialog It is common to break when a CLR exception is “thrown”
o This will break even when the exception is caught by a try/catch block
![Page 62: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/62.jpg)
Variables Windows They Are:
o Locals (Ctl-Alt-V,L)o Autos (Ctl-Alt-V,A)o Watch (Ctl-Alt-W,1-4)o Quick Watch (Ctl-Alt-Q)
All have similar functionalityo All display values of variables and allow for in-place editing
Provides access to debugging visualizers
![Page 63: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/63.jpg)
Runtime Variable Tooltips Provides ability to view all of an objects properties and manipulate the values
directly in the tooltip Provides access to debugging visualizers
![Page 64: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/64.jpg)
Debugging Visualizers New to VS.NET 2005+ Special user interfaces used to view the values of specific data types in variable
windows or runtime tooltips Noted by the magnifying glass icon near the value
o Click to open visualizer Notable visualizers:
o Datasetso Testo XMLo HTML
![Page 65: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/65.jpg)
Immediate Window Ctl-Alt-I to bring up the Immediate Window The immediate window can be used to execute statements and evaluate
expressions in the context of the current statemento Access to any variable in scope is grantedo Can assign values to variables, read values, execute methods, etc
Use the “>” character to allow entry and use of any VS commands (as in the Command window)
Command window has much of the same functionality
![Page 66: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/66.jpg)
Son of Strike (SoS) SoS is a debugger extension that is loaded with VS.NET and available from
within the IDE from the Immediate Window To load SoS:
o Edit your project properties and, under the Debug tab, check the “Enable Unmanaged Code Debugging”
o Open the Immediate Window and enter:• .load sos
o For help, enter:• !help
![Page 67: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/67.jpg)
Debugging The BCL Microsoft has made many of the debug symbols for the Base Class Libraries
available for public useo What does this mean?o Does this mean .NET is open source?
![Page 68: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/68.jpg)
Debugging into the BCL How can I hook this up?
o Options->Debugging->Generalo UNCHECK “Enable Just My Code”o CHECK “Enable Source Server Support”o Go to Options->Debugging->Symbols and add
• http://referencesource.microsoft.com/symbolso Select an offline cache locationo CHECK “Search Above Locations Only When Symbols are Loaded manually”
Loading Symbolso From the Modules window or the Call Stack, right click on a BCL DLL and select “Load
Symbols”
![Page 69: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/69.jpg)
VS.NET PLUG-INS
![Page 70: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/70.jpg)
Add-In Demonstrations GhostDoc Source Code Outliner VS.NET 2008 Power Commands Snippet Designer RockScroll VsBuildStatus CodeProject Browser
![Page 71: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/71.jpg)
EXTERNAL TOOLS
![Page 72: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/72.jpg)
External Tools Demo Launchy SharpDevelop XAML Tools
o KaXamlo XamlCruncher
XmlNotePad LinqPad Reflector Process Monitor Graphics Tools
o Paint.NETo Gimp
Web Development Toolso FireBug (for FireFox)o Web Dev Helper (for IE)
![Page 73: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/73.jpg)
ADDITIONAL RESOURCES
![Page 74: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/74.jpg)
Visual Studio Add-In URLS VSBuildStatus
o http://visualstudiogallery.com/ExtensionDetails.aspx?ExtensionID=2a2293b4-1808-44aa-b030-661f6803d8a1 XAML Power Toys
o http://karlshifflett.wordpress.com/xaml-power-toys/ Source Code Outliner
o http://www.codeplex.com/SourceCodeOutliner Snippet Designer
o http://www.codeplex.com/SnippetDesigner StyleCop
o http://code.msdn.microsoft.com/sourceanalysis VS.NET 2008 Power Commands
o http://code.msdn.microsoft.com/PowerCommands Ghost Doc
o http://www.roland-weigelt.de/ghostdoc/ RockScroll
o http://microsoftdev.blogspot.com/2008/05/rock-scroll-visual-studio-plugin.html Ora
o http://www.codeplex.com/ora CodeProject Browser
o http://www.codeproject.com/KB/macros/cpbrowser.aspx CodeRush Xpress
o http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/
![Page 75: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/75.jpg)
External Tools URLs Launchy
o http://www.launchy.net/ Delicious
o http://delicious.com/ FxCop
o http://code.msdn.microsoft.com/codeanalysis/Release/ProjectReleases.aspx?ReleaseId=553 Kaxaml
o http://www.kaxaml.com/ XamlPadX
o http://blogs.msdn.com/llobo/archive/2008/08/25/xamlpadx-4-0.aspx LinqPad
o http://www.linqpad.net/ XamlCruncher
o http://www.charlespetzold.com/blog/2007/07/100411.html SharpDevelop
o http://www.icsharpcode.net/OpenSource/SD/ XmlNotepad
o http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en Reflector
o http://www.red-gate.com/products/reflector/ Paint.NET
o http://www.paint.net/ Process Monitor
o http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx ZoomIt
o http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx Web Dev Helper
o http://projects.nikhilk.net/WebDevHelper FireBug
o http://getfirebug.com/
![Page 77: Visual Studio.NET: Tips, Tricks, & Toys by Kevin Grossnicklaus ArchitectNow](https://reader035.fdocuments.us/reader035/viewer/2022062410/56816381550346895dd4660b/html5/thumbnails/77.jpg)
Conclusion
Thank you for coming!