DEV354 Visual Studio 2005: New Enhancements For Debugging Applications 2004 MVP Global Summit April 4-7, 2004 DEV354 Visual Studio 2005: New Enhancements For Debugging Applications Habib Heydarian (habibh) Scott Nonnenberg (scottno) Program Managers Microsoft Corporation © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
What We’ve Heard… It’s difficult to view data 2004 MVP Global Summit April 4-7, 2004 What We’ve Heard… It’s difficult to view data Too many windows Hard to find the data I want I don’t know what my code is doing Multi-threaded debugging is hard I need to debug XSL Transforms © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
“Too Many Windows” 2004 MVP Global Summit April 4-7, 2004 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Visual Studio 2002/2003 Many windows to look at data Autos Locals 2004 MVP Global Summit April 4-7, 2004 Visual Studio 2002/2003 Many windows to look at data Autos Locals Watch QuickWatch Etc. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips In 2002/2003 DataTips are great but not enough: 2004 MVP Global Summit April 4-7, 2004 DataTips In 2002/2003 DataTips are great but not enough: Good for viewing simple data Not good for complex objects Have to switch to other windows to view complex objects © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips In 2005 The all-in-one debugging tool! 2004 MVP Global Summit April 4-7, 2004 DataTips In 2005 The all-in-one debugging tool! Code in the editor, debug in the editor © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips Scott Nonnenberg Program Manager Visual C# 2004 MVP Global Summit April 4-7, 2004 DataTips Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
“It’s Hard To Find The Data I Want” 2004 MVP Global Summit April 4-7, 2004 “It’s Hard To Find The Data I Want” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Viewing Data In 2002/2003 Challenge: Properties versus fields? 2004 MVP Global Summit April 4-7, 2004 Viewing Data In 2002/2003 Challenge: Properties versus fields? Static members versus non-static members? © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Viewing Data Scott Nonnenberg Program Manager Visual C# 2004 MVP Global Summit April 4-7, 2004 Viewing Data Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Screen Real Estate Duplicate information Useful information! 2004 MVP Global Summit April 4-7, 2004 Screen Real Estate Duplicate information Useful information! In 2002 and 2003 Use mcee_cs.dat In VS 2005 Use attributes to customize the debugger <System.IO.FileStream>=File=<_fileName> Pos=<_pos> [assembly: DebuggerDisplay ( "File={_fileName} Pos={_pos}", Target=typeof(System.IO.FileStream) )] © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
2004 MVP Global Summit April 4-7, 2004 Too Much Information Internal implementation may not be useful when debugging In Visual Studio 2003: Special case ArrayList, Hashtable In Visual Studio 2005 Use attributes to customize the debugger Default views for most collections Extensible © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Hierarchical View Not Enough 2004 MVP Global Summit April 4-7, 2004 Hierarchical View Not Enough Data windows only show hierarchical view Not ideal for viewing some types DataSet Image XML In Visual Studio 2005 Debugger Visualizers to the rescue! © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Making Data Easier To View 2004 MVP Global Summit April 4-7, 2004 Making Data Easier To View Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
“I Don’t Know What My Code Is Doing” 2004 MVP Global Summit April 4-7, 2004 “I Don’t Know What My Code Is Doing” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Tracepoints Breakpoints and Tracing rolled into one 2004 MVP Global Summit April 4-7, 2004 Tracepoints Breakpoints and Tracing rolled into one Trace + Breakpoint = Tracepoint Instrument your application without changing code When a Tracepoint is hit, you can Print a message Message goes to the Output Window Run a Visual Studio macro Same familiar interface as a breakpoint © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Tracepoints Scott Nonnenberg Program Manager Visual C# 2004 MVP Global Summit April 4-7, 2004 Tracepoints Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Tracepoints Message Syntax 2004 MVP Global Summit April 4-7, 2004 Tracepoints Message Syntax Any string “Hello World” Any valid expression {firstName} Predefined messages like $FUNC, $TID “{$FUNC}” Any combination of the above “ID = {this.ID} in function {$FUNC}” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
“Multi-Threaded Debugging Is Hard” 2004 MVP Global Summit April 4-7, 2004 “Multi-Threaded Debugging Is Hard” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Breakpoint Filters Advanced feature for debugging 2004 MVP Global Summit April 4-7, 2004 Breakpoint Filters Advanced feature for debugging Distributed applications Multi-process applications Multi-threaded applications Filter breakpoints by Process ID or name Thread ID or name Machine name © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Multi-Threaded Debugging 2004 MVP Global Summit April 4-7, 2004 Multi-Threaded Debugging Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
“I Need To Debug XSL Transforms” 2004 MVP Global Summit April 4-7, 2004 “I Need To Debug XSL Transforms” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Debugging XSL Transforms 2004 MVP Global Summit April 4-7, 2004 Debugging XSL Transforms You can now debug XSL Transformations inside Visual Studio Two ways to do this: Debug a standalone XSLT document Use XML->Debug XSL to start the debugger Debug an XSLT document loaded by an app Step Into XSLTProcessor.Execute() Use normal debugger functionality, e.g., Watch, Stepping, etc. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Debugging XSL Transforms 2004 MVP Global Summit April 4-7, 2004 Debugging XSL Transforms Scott Nonnenberg Program Manager Visual C# © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Developer Centers on MSDN 2004 MVP Global Summit April 4-7, 2004 Developer Centers on MSDN http://msdn.microsoft.com/vcsharp http://msdn.microsoft.com/vbasic http://msdn.microsoft.com/visualc http://msdn.microsoft.com/vjsharp Debugger Team Blogs http://blogs.msdn.com/scottno http://msdn.microsoft.com/vcsharp/team/blogs/#debugger © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Please fill out a session evaluation on CommNet 2004 MVP Global Summit April 4-7, 2004 Please fill out a session evaluation on CommNet Q1: Overall satisfaction with the session Q2: Usefulness of the information Q3: Presenter’s knowledge of the subject Q4: Presenter’s presentation skills Q5: Effectiveness of the presentation © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Questions? 2004 MVP Global Summit April 4-7, 2004 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
© 2004 Microsoft Corporation. All rights reserved. 2004 MVP Global Summit April 4-7, 2004 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Reference Slides 2004 MVP Global Summit April 4-7, 2004 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips Navigation Via mouse Via keyboard 2004 MVP Global Summit April 4-7, 2004 DataTips Navigation Via mouse Display DataTip: move mouse over variable Expand item: move mouse over ‘+’ (don’t need to click) Collapse item: click mouse over ‘-’ OR move mouse off current expansion Via keyboard Expand item: → Collapse item: ← Move up/down: ↑↓ © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
2004 MVP Global Summit April 4-7, 2004 DataTips Scrolling Vertical scroll bar appears if > 15 items in DataTip Via Mouse Single-click on arrow to scroll up/down Use mouse wheel to scroll up/down Hover mouse over arrow to auto-scroll Via Keyboard Page Up/Page Down to scroll 15 items at a time Up Arrow, Down Arrow to scroll 1 item at a time © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips Editing To go into edit mode: 2004 MVP Global Summit April 4-7, 2004 DataTips Editing To go into edit mode: Single-click on variable name or value OR Right-click item and select “Edit Value” from shortcut menu Press ENTER to apply edit and exit edit mode Press ESC to undo edit and exit edit mode Other debugger windows are updated with new value © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
DataTips Tips and Tricks 2004 MVP Global Summit April 4-7, 2004 DataTips Tips and Tricks See your code underneath a DataTip Press CTRL to make a DataTip temporarily transparent! Add a variable in a DataTip to the Watch window Right-click variable and select “Add Watch” © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.