Viewing the Activity Log for VS 2010

2009 November 1
tags:
by r.claypool

Are you repeatedly getting a less than helpful error dialog in Visual Studio 2010?

Go to the command line and run devenv.exe with logging, reproduce the error in the IDE and then open ActivityLog.xml:

devenv

C:\>cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /Log
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>cd %APPDATA%
C:\Documents and Settings\username\Application Data>cd "Microsoft\VisualStudio\10.0"
C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\10.0>dir ActivityLog.xml /B ActivityLog.xml
C:\Documents and Settings\username\Application Data\Microsoft\VisualStudio\10.0>notepad ActivityLog.xml

Look for entries with type=Error, e.g.

<entry>
<record>263</record>
<time>2009/10/24 22:50:09.218</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.GetEditorFontForItem(IVsColorTable colorTable, Int32 itemIndex, FONTCOLORPREFERENCES2 fontColorPreferences)
at Microsoft.VisualStudio.Editor.Implementation.VsFontsAndColorsInformation.TryGetItemValue(String itemKey, ResourceDictionary& itemValue)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.CreateResourceDictionaryFromProvision(String key)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMap.GetProperties(String key)
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetDefaultProperties()
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap..ctor(ICollection`1 formats, IClassificationTypeRegistryService classificationTypeRegistry, IEditorFormatMap formatMap)
at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMapService.GetClassificationFormatMap(String category)
at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.AttachToFormatMaps()
at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap..ctor(IClassificationFormatMapService classificationFormatMapService, IEditorFormatMapService editorFormatMapService, ITextView textView)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.<>c__DisplayClass1.<GetEditorFormatMap>b__0()
at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)
at Microsoft.VisualStudio.Text.Classification.Implementation.EditorFormatMapService.GetEditorFormatMap(ITextView textView)
at Microsoft.VisualStudio.Text.Editor.Implementation.OutliningAdornmentManagerFactory.CreateTagger[T](ITextView textView, ITextBuffer buffer)
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
</entry>
No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Creative Commons Attribution 3.0 United States
Creative Commons Attribution 3.0 United States