Sunday, November 21, 2010

Logging Visual Studio Actions

As almost every piece of software Visual Studio behaves strangely from time to time, weird error messages, crashes,… I’ve seen it all. A first help to trace the source of the problem is to start Visual Studio with logging enabled. You can do this by starting Visual Studio with the /log switch:

devenv.exe /log [filename]

The [filename] is optional and if not specified will call the log ActivityLog.xml by default.  The path is to the file is:

%APPDATA%\Microsoft\VisualStudio\<version>\ActivityLog.xml 

There is an XML stylesheet (XSL) comes with the XML data so if you view the file in your browser you will see this nice view:

ActivityMonitorLog

No comments: