Wednesday, February 4, 2009

Enabling Parallel Debugging Tools in the Visual Studio 2010 CTP

Copyright 2008-2009, Paul Jackson, all rights reserved

Today I convinced a coworker to investigate the .Net 4.0 parallel extensions and the new debugging tools in Visual Studio 2010.  A couple hours later I got an email from him asking why the Tasks and Multistack debug windows didn’t show any data, so I pointed him to Daniel Moth’s blog entry that explains there’s a bug in the CTP and how to load the mscorlib debug symbols so data will display.

A little while later I got a rather sheepish “huh?” from him.

One thing we should always consider when passing along blog entries or firing off instructions to other developers is that they may not have the same experience as we do – this doesn’t mean they’re less-experienced, just differently.  In this particular case, the developer is pretty experienced and there are any number of topics I’d consider him an expert on, but he’s never had a reason to load debug symbols manually.

So I spent a few minutes explaining the process to him and we both learned something: he learned about debug symbols and I learned to spend a bit more time making sure my audience has the frame of reference I think they do.

The windows in question are the new Tasks and Multistack (these will, apparently, be renamed in a future release) options under Debug | Windows:

imageIn the current CTP, the windows for these options remain empty due to a defect in the CTP – the debug symbols for mscorlib aren’t being loaded.

To correct this problem, you’ll simply need to load the symbols via the Tools | Options window.  Once that’s open, go to Debugging | Symbols:

image Click the new folder icon (circled in green above) to insert a new location into the list.  The location you want to add is: C:\Windows\Microsoft.NET\Framework\v4.0.*

image Now Visual Studio will be able to find the debug symbols in mscorlib.pdb, but you’ll still want to ensure that they get loaded by using the Modules window.  I typically set a breakpoint on the first line of my application, then click Debug | Windows | Module:

image The mscorlib.dll will typically be first in the list and its Symbol Status will be “Skipped loading symbols.”  Right-click on mscorlib.dll and click Load Symbols From > | Symbol Path.  The Symbol Status will change to Symbols Loaded.  Now the Tasks and Multistack windows will now be loaded with data:

image For a good overview of how these windows will work in the eventual release, watch Daniel Moth’s video on the subject.


Jerome C. Bryant said...

Thank you for such instruction, it can be very useful for me. Because on my computer often have errors, and I am looking for a long time to solve them. Recently, I had a similar error, for solution of which was necessary to download vcruntime140.dll missing file. I am sure that you may also try this method for sure.

Abby Birkbeck said...

Tools of the debugging have been invited for the use of the norms for the humans. The chapter has been embraced with the help of the essay editing service australia for all official and such mattes for the humans.