Skip to content
Merged
Prev Previous commit
Update dev docs
  • Loading branch information
donnie-msft committed Aug 30, 2022
commit 52a061550849f4042380104d86b9ac1ccab5780c
5 changes: 4 additions & 1 deletion docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ If you want to test dotnet.exe explicitly, so you don't have to worry about whet
### Debugging NuGet Command Xplat Functionality (add-package/remove-package/list package)

Functionality such as `dotnet.exe add package` or `dotnet list package`, is implemented in [NuGet.CommandLine.XPlat](../src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj).
There are 2 ways to debug this:

To debug with `MSBuildLocator`, you need to un-comment the `PackageReference` for `Microsoft.Build.Locator` in `NuGet.CommandLine.XPlat.csproj`. Additionally, un-comment the code utilizing `MSBuildLocator` in that project's `Program.cs`.

There are 2 ways to debug this project:

* Given that [NuGet.CommandLine.XPlat](../src/NuGet.Core/NuGet.CommandLine.XPlat/NuGet.CommandLine.XPlat.csproj) is an exe, you can set it as the startup project and run it as you would any other command line project in Visual Studio. Note that some commands list arguments in a different order to the dotnet cli.

Expand Down