-
Notifications
You must be signed in to change notification settings - Fork 333
Debugging
There are several tools available to help you debug your application.
The Microsoft.Owin.Diagnostics nuget package contains a welcome page and an error page. The UseWelcomePage extensions can be used to add a simple html page to your application to verify the site is up and running. The UseErrorPage extensions can be used to add an Exception filter to the request pipeline that will display exception and request details.
Starting with v2.0.0 Katana's debug symbols are now being published to symbolsource.org (instructions). The nightly dev and nightly release symbols are also available.
The Katana servers and middleware log errors to the .NET trace infrastructure by default. Components log under their full name, including namespace, so logs can be enabled per component, per namespace, or globally for everything in the Microsoft.Owin namespaces. By default logs are sent to the Visual Studio output console during debugging. Here's how to also direct them to a file:
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="Microsoft.Owin">
<listeners>
<add name="KatanaListener"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add
name="KatanaListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="Katana.trace.log"
traceOutputOptions = "ProcessId, DateTime"
/>
</sharedListeners>
<switches>
<add name="Microsoft.Owin" value="Verbose" />
</switches>
</system.diagnostics>