Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see C# Nuget Package's source code on Visual Studio Code?

Is there any way to see a Nuget Package's source code when we choose "Go to Definition" (or F12 or CRTL+click)? At this time, I click (CRTL+click) on some class from Nuget Package in my code and the vscode shows me an assembly summary [metadata], where I can see only docs and methods signature. I'd like to see all the source code from this class. Is there some extension I need to install or I misunderstood some config?

like image 460
Barizon Avatar asked Oct 24 '25 06:10

Barizon


1 Answers

I believe you can now do this with source link enabled libraries (nuget packages included).

You can have a look at these .NET blog posts from Claire:

  • Improving Debug-time Productivity with Source Link
  • Producing Packages with Source Link

With Source Link-enabled libraries, the debugger can download the underlying source files as you step in, and you can set breakpoints/tracepoints like you would with any other source.

like image 92
webpat Avatar answered Oct 26 '25 19:10

webpat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!