Finding the Visual Studio Activity Log

Sometimes when something goes wrong in Visual Studio, you might see the following dialog:

Visual Studio has encountered an exception...

We’ve had a number of users comment that the couldn’t find the file.  This is because the file is only written when you run Visual Studio’s executable (devenv.exe) with the /log parameter.  If you are reporting an issue to us (especially through the Connect site), the contents of the log file are very useful.  If you’re developing a custom extension to Visual Studio, this can also be useful for determining when and why something doesn’t work.

There are two easy ways to run Visual Studio with the /log parameter.  First, from the command line:

Run devenv from the command line

And second by editing the shortcut you use to run it:

add /log to an existing shortcut