domaindrivendev / Swashbuckle.AspNetCore

Swagger tools for documenting API's built on ASP.NET Core
MIT License
5.26k stars 1.32k forks source link

[Feature request]: Distribute debug symbols/PDB files #3165

Closed ldeluigi closed 2 days ago

ldeluigi commented 3 days ago

Is your feature request related to a specific problem? Or an existing feature?

I am trying to debug Swashbuckle behavior but can't due to debug symbols missing

Describe the solution you'd like

Distributing PDB files/debug symbols in BuGet enables to debug swashbuckle from code dpendning on it

Additional context

No response

martincostello commented 3 days ago

I'll have to check when I'm at a computer, but there should be embedded symbols in the assemblies so you should be able to debug without PDB files.

ldeluigi commented 3 days ago

True but the experience is not very seamless and clean

martincostello commented 3 days ago

That sounds more like a problem with whatever tooling you're using, than something we need to worry about.

I'm fairly sure the setup here is the same one I put into Polly, and last time I debugged through into non user code in Visual Studio it all "just worked".

Again, I'll check it for myself when I'm at a computer, but if I get the experience I'm expecting to get with the latest version of Swashbuckle, then it's working as intended.

ldeluigi commented 3 days ago

You can close the issue if it's the case

martincostello commented 3 days ago

Thanks for opening the issue, but this is working as I would expect in Visual Studio 2022 17.12.1.

Stepping into this method in a sample project of mine using Swashbuckle.AspNetCore 7.0.0, the debugger steps into the relevant code correctly when Just My Code is disabled:

image

martincostello commented 3 days ago

Actually, no, I think you're right and it's not setup correctly - I just noticed that's the disassembled code, not the actual code.

Compare with the real top-of-the-method:

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/bb498849621f36ea17d83e76631869c240732b0d/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/SwaggerGenServiceCollectionExtensions.cs#L17-L19

Saibamen commented 13 hours ago

snupkg files are created and published for all packages except Swashbuckle.AspNetCore:

image

martincostello commented 12 hours ago

I'm going to guess that's a detail of the fact it's a meta-package and doesn't contain any actual code.