newtelligence poweredRSS 2.0
# Wednesday, November 25, 2009

This post is part of my PDC09 Conference Notes series. These are my raw notes taken while watching the various session videos from PDC09. Refer to my original post for some conventions I tried to use.

  • 4 Scenarios:
    • It Works on My Machine
    • Choose the right tests
    • Solve Complex Debugging Tasks
    • Multi-Tier Performance Analysis
  • Hard to Reproduce Bugs (It works on my machine/I can't reproduce it)
    • Solved by a new feature, IntelliTrace
    • Used to be solved by adding Debug statements
    • IntelliTrace adds Record, Playback and Rewind
    • Demo shows a nightly build that failed
      • Click thru the build report to view the IntelliTrace log file
      • Shows Threads, test data, system info, loaded modules
      • Double click on call stack for the exception (test failure) line where error occurred and takes you to the exact line in the source code.
      • Step forwards and backwards in playback to view what was going on (variable state, etc)
      • Filter which events you want to see (Asp.Net, ADO.Net, Registy, etc)
    • You can now see the return value of methods!
    • Records the exact execution path thru branches eliminating guess work.
    • No need to add anything to your code
    • Various levels of recording. The more you record, the higher the performance impact. No mention was made of how much of a performance hit, although the default settings are not supposed to impact it much.
    • Works with Asp.Net as well. Tracks events like gets and posts, allows you to jump into code at that point in time
    • How does it Work?
      • IntelliTrace record starts, loads CollectionPlan.xml and starts recording
      • IntelliTrace does not allow you to change what happens in your code since it's a recording. You can't change a variable for example
    • Settings
      • IntelliTrace is set in Tools/Options/Intellitrace.
      • Maximum amount of disk space for recording
      • Where are they stored? C:\ProgramData\Microsoft Visual Studio\10.0\TraceDebugging\
    • What do you need to get IntelliTrace on a PC?
      • Install visual studio
      • Install Test and Lab Manager
      • Install Test Agent

IntelliTrace Options Window
IntelliTrace Options Window

  • Test Impact Analysis (Choosing the right tests to run)
    • Automatically pinpoint which tests are impacted as a result of a code change, including manual tests, although I'm not sure how it works
    • TIA, as far as I can tell will only run with tests written in MS Test.
    • If it can work with Manual tests, I see some advantage with that, but not running all of your automated tests just seems bad. It seems like they may be fixing a symptom (slow running tests) instead of the problem (poorly written tests)
    • Working from the Nightly Build point of view
      • You can see impacted tests
      • You can drill thru the impacted tests to see what changes caused the tests to be impacted.
  • Multi-Tier Performance Analysis
    • Scenario: Client Side script in the browser, business logic, database calls
    • To start, goto Debug and click Start Profile Analysis
      • Select Profile Type
      • Select Project, Executable or Asp.net/java script application
      • Enable Tier Interaction Profiling
    • My Demo (I tried this out locally while watching the video)
      • Ran a Asp.Net MVC project
      • I run everything as a normal user, not an admin. However, you need to be an admin, but VS prompts your for credentials and it just works.
      • You start out in summary view, but there is a drop down at the top (Current View) that gives you access to stuff like Tier Interactions.
      • Tier Interactions showed my database calls, the sql executed and how long they took
      • It takes a little longer for it to get started, so there is a still a place in my book for using SQL query analyzer while developing, but for end to end debugging of slow pages, this is awesome.
    • Report Shows
      • Most expensive code paths
      • Lets you look at "all code" which will include the base class library and loaded modules
      • Jump between various report views by right clicking
      • Jump to code
  • Collaborative Debugging (Solve Complex Problems)
    • While debugging, pin the value of a variable to the editor window (right click while hovering)
    • You can add comments to those pinned values
    • You can export a break points and data tips as XML which you can then e-mail or what ever
    • After you import the break point and data tips, run the app in debug mode
      • Application will stop on the break point
      • The value and comments will be displayed as exported/imported
  • Debug a Crash in a Deployed Application using Dump Files
    • When application crashes, open up task manager, find the task, right click and chose create dump file.
    • No need to have anything installed to create the dump file
    • Open dump file in visual studio, and you can debug it.
      • Shows stuff about the computer it was running on
      • Modules Loaded
      • OS
    • Press ctrl+alt+q to get to QuickWatch, and type in $expression, and you'll get info on the exception that caused the crash.
    • My Test/Demo
      • Create new Widnows forms app with a button. When clicking the button throw new exception.
      • Close VS, and run compiled application. Click on the button. The unhandled exception dialog will appear. At this point, go into task manager, find the process, right click and choose create dump file.
      • Dump file was created in: C:\Users\USERNAME\AppData\Local\Temp\APPLCIATIONNAME.DMP
      • Quit the application and go find the dump file and double click on it, VS will launch.
      • You get the basic information, native debugging (machine code), but no managed debugging.
      • It looks like you have to download the symbols from Microsoft, and possible set a path for the debug symbols for your application, but I wasn’t able to get it to work when I tried it. I will re-post if I get it to work.
Wednesday, November 25, 2009 3:11:31 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Conference Notes | Visual Studio
Archive
<November 2009>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright 2010
Adam Salvo
Sign In
Statistics
Total Posts: 251
This Year: 26
This Month: 0
This Week: 0
Comments: 34
Themes
Pick a theme:
All Content 2010, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)