Saturn icon indicating copy to clipboard operation
Saturn copied to clipboard

SourceLink support for easier debug

Open Luiz-Monad opened this issue 3 years ago • 2 comments

Context: I was trying to find an amusing problem with my SAFE app on docker-alpine-aspnet, then I stumbled in a crash that ApplicationInsights wasn't reporting any error, only that the request returned 500 - internal server error. My problem turned out to be some stupid missing dependencies because of a broken paket.lock, now our problem at hand.

Problem: Now the problem I had with my debugging is that when I got the Visual Studio to attach inside the Kestrel inside the container, It didn't had the Saturn.pdb that would support the debugging experience, so I couldn't put breakpoints.

Workaround I found an workaround by following this issue https://github.com/dotnet/sdk/issues/1458, from https://github.com/dotnet/msbuild/issues/2920. Better support for pdb on nuget is being developed (tracked by this https://github.com/NuGet/Home/issues/5926), meanwhile if we use the sourcelink, it will fix everything magically.

Proposed Solution Doing the same as what this project did (https://github.com/abpframework/abp/pull/6421) would solve the sourcelink problem.

image

Note that somehow Giraffe does it right. 1 image

Luiz-Monad avatar Dec 20 '20 01:12 Luiz-Monad

We released a NuGet package you can add to make this easier to configure. Directions are in the readme: https://github.com/dotnet/reproducible-builds

clairernovotny avatar Jul 27 '21 13:07 clairernovotny

Nice @clairernovotny, that will reduce a lot of the boilerplate!

baronfel avatar Jul 27 '21 13:07 baronfel