Skip to content

Instantly share code, notes, and snippets.

@nickcox
Created May 17, 2021 07:42
Show Gist options
  • Save nickcox/c6b825b1347e4d444e9d9389a36e7772 to your computer and use it in GitHub Desktop.
Save nickcox/c6b825b1347e4d444e9d9389a36e7772 to your computer and use it in GitHub Desktop.
Redirect `Debug.WriteLine` output to a text file
<system.diagnostics>
<sharedListeners>
<add name="file"
autoFlush="true"
append="false"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
customLocation="c:\temp"
location="Custom"
logFileCreationSchedule="Daily"
baseFileName="Log"/>
</sharedListeners>
<trace>
<listeners>
<add name="file" />
</listeners>
</trace>
</system.diagnostics>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment