Captures synchronous and asynchronous exceptions from the pipeline and generates HTML error responses.
If the error page is setup as the last middleware, it will not capture anything. The UseDeveloperExceptionPage equivalent feature of ASP.NET Core documentation is clear about this:
Put UseDeveloperExceptionPage before any middleware you want to catch exceptions in, such as app.UseMvc.
IAppBuilder.UseErrorPage() documentation also states this:
Full error details are only displayed by default if 'host.AppMode' is set to 'development' in the IAppBuilder.Properties.
The easiest way to set the host.AppMode to development is to set the VisualStudioVersion environment variable to anything non whitespace. I guess that this is done automatically when running from Visual Studio. If you are using JetBrains Rider then adding VisualStudioVersion=Rider environment variable in the Run/Debug configuration will do the trick to get full error details with stack trace. (I found this by reading the Microsoft.Owin.Hosting implementation.)
The documentation for
IAppBuilder.UseErrorPage()
states this:If the error page is setup as the last middleware, it will not capture anything. The
UseDeveloperExceptionPage
equivalent feature of ASP.NET Core documentation is clear about this:IAppBuilder.UseErrorPage()
documentation also states this:The easiest way to set the
host.AppMode
todevelopment
is to set theVisualStudioVersion
environment variable to anything non whitespace. I guess that this is done automatically when running from Visual Studio. If you are using JetBrains Rider then addingVisualStudioVersion=Rider
environment variable in the Run/Debug configuration will do the trick to get full error details with stack trace. (I found this by reading the Microsoft.Owin.Hosting implementation.)