Quantcast
Channel: TechNet Technology News
Viewing all articles
Browse latest Browse all 13502

Debugger Source Symbol Improvements in Visual Studio 2012 Update 1

$
0
0

Two years ago Brian Keller sent me a piece of mail asking if I was tracking an up and coming ALM community person out of the UK for an MVP nomination: Tarun Arora.    

Anything that catches Mr. Keller’s eye is definitely worthy of further investigation; i indicated i wasn’t and inquired as to what brought him to attention. 

Brian’s reply was something like:

“He translated the ALM hands on labs into Hindi”

Not that impressed, i asked: Which one of the hands on lab did he translate?” to which Brian replied“ALL OF THEM!” 

Since then Tarun has been on of the star ALM MVPs and the yard stick i tend to measure all other community contributors…

Thanks for the great post Tarun!

***************************************************************

Debugger Source Symbol Improvements to Visual Studio 2012 by Tarun Arora

As part of the Visual Studio 2012 Quarterly update 1, improvements have been made to the debugger for loading symbols and source. The improvements can be broken down into 4 buckets,

  1. Performance Improvements
  2. No Source Landing Page
  3. Load Symbols Context Menu
  4. Source Server Dialogue

 

Performance Improvements

Significant performance gain has been achieved by,

  • Caching symbols aggressively
  • Detecting bad symbol paths to bail out earlier

Previously a bad symbol path caused at least a 30 seconds delay before the request was timed out. The debugger is now tuned to identify cases causing long and unnecessary symbol loading delays such as symbol server not being available, bad cache path, incorrect symbol server location, etc. The improvement makes it so that once a “bad situation” has been detected, the debugger will spend no more than a few seconds to time out. To add a bit of flavour on an average 30 second time-outs have been reduced to just 3s once the problem is detected. 

No Source Landing Page

While debugging if you don’t have the source file locally available or are missing the binary when dump debugging you are redirected to a “No Symbols Loaded” page. This page was fairly limited previously and often didn’t indicate why you were seeing this page rather than the source code. There are currently 10 different reasons that could bring up this page,

  1. Binary not loaded (dump debugging)
  2. Symbol not loaded
  3. Symbol not loaded because it’s not in the include list
  4. Symbol not loaded because it’s in the exclude list
  5. Symbol loading skipped for optimized modules with Just My Code enabled
  6. Source not found (or mismatched)
  7. Source not available in the .pdb file (stripped symbol files like are on the MS Public symbol server)
  8. Stopped in external code with Just My Code enabled
  9. No code is running (some helper threads stick around but have no code. In jscript debugging, the main thread may not be running any jscript code)
  10. Symbol not loaded when looking at a thread in an IntelliTrace log file

After you have installed Visual Studio 2012 Quarterly update 1, you will notice that it takes significantly less time before you are redirected to the “No Symbols Loaded” page (remember, bad symbol paths are detected and bailed out early) and the page gives you valid reasoning on why it failed to load the source. The page has also been improved to allow you to find your pdb directly and have more information about what file the debugger is looking for rather than having to go to tools->options->debugger->symbols page to figure out and change settings. 

image

Figure 1 – The screen shot shows the expected behaviour, if you hit an exception in code you don’t have the symbol path configured for yet

Load Symbols Context Menus

Previously the context menu relating to symbols numbered at around 9 total items. With Visual Studio 2012 Quarterly update 1 this has now been streamlined to 4 so as to reduce any confusion or friction a customer may have had with these menu items.

LoadSymbolsOldContextMenuNewLoadSymbolsContextMenu
Figure 2 – Old Context Menu Figure 3 – New Context menu

Source server dialog

If you have set up “Enable source server support” and start debugging Visual Studio will give you a Security Warning dialogue as it attempts to load the source code from TFS.

image

Figure 4 – Enable Source Server support from Tools->Options->Debugging

Previously only the run or don’t run options were available on the security warning dialogue. There was a lot of feedback from customers around disabling Visual Studio Source Server Security Warning Dialogue (and there was a work around as well). With Visual Studio 2012 Quarterly update 1 additional options have been added to the dialog to allow customers to accept this as a trusted command and not throw a security warning again.

DebugUsingSymbolsSecurityWarning

Figure 5 – Security Warning dialogue with additional options

Next Steps

In the end… Special thanks to Marc Paine, Brad Sullivan and Charles Sterling (editors note: i did very very little here!) for reviewing the content post.

 

By Tarun Arora

Tarun Arora is a Microsoft Certified professional developer for Enterprise Applications. He has extensively travelled around the world gaining experience learning and working in culturally diverse teams. Tarun has over 5 years of experience developing 'Energy Trading & Risk Management' solutions for leading Trading & Banking Enterprises. His passion for technology has earned him the Microsoft Community Contributor and Microsoft


Viewing all articles
Browse latest Browse all 13502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>