次の方法で共有


/Log (devenv.exe)

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Logs all activity to the log file for troubleshooting. This file appears after you've called devenv /log at least once. By default, the log file is located here:

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

where <Version> is the Visual Studio version. However, you may specify a different path and file name.

Syntax

devenv /Log NameOfLogFile

Arguments

  • NameOfLogFile

    Required. The full path and name of the log file to save to.

Remarks

This switch must appear at the end of the command line, after all other switches.

The log is written only for all instances of Visual Studio that you've opened with the /Log switch.

Example

This example directs logging to the MyVSLog.xml file in the user's home directory.

devenv /log "%USERPROFILE%\MyVSLog.xml"

See also