Normally when you look at Exception.StackTrace, it looks pretty bad for async method calls, and doesn't even include line numbers when it's run on a device like Phone which lacks PDBs.
This package provides an alternative, Exception.StackTraceEx(), which has cleaned up async output, and which gives line and file numbers even on phone.

This way, if your app crashes, you can synthesize much better crash reports for the user to email back to you.

Await DownloadAsync(url).Log()

To get that richer information in exception stack-traces, you have to augment your "await expr" calls with "await expr.Log()", as shown above.

Await DownloadAsync(url).Log("DownloadAsync",url)

If you chose to include more information, then the exception stack traces you get will be even richer and more actionable.

Install-Package AsyncStackTraceEx -Version
dotnet add package AsyncStackTraceEx --version
<PackageReference Include="AsyncStackTraceEx" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AsyncStackTraceEx --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated 73,508 8/15/2015 859 4/13/2015 1,113 9/3/2014
1.0.0 831 8/24/2014