Gianluca Ghettini
Gianluca Ghettini

Reputation: 11658

When debugging I can step into my NuGet package

I created a brand new NuGet package for internal use

it is:

However, I'm able to step into the provided API! How can it be?

NOTE: I moved away the actual source code. The project which is using the package doesn't "see" the package source code

Upvotes: 1

Views: 221

Answers (2)

Anton Gogolev
Anton Gogolev

Reputation: 115857

By default, Release builds produce PDB files. Among other information, these PDB files contain locations of source files.

When you step through your code, Visual Studio loads the PDB file, from there it extracts full paths to source files, and as long as it can access them (which it can, provided that you've built your NuGet package locally), you get to step though library code.

Upvotes: 1

Vampirasu
Vampirasu

Reputation: 202

just dont publish the pdb file :)

PS: if your VS knows the path to the sources from your Nuget Package, he will still be able on your PC to do a Step by Step debug.

Upvotes: 1

Related Questions