Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Support Source Link with unit test debugging (or document how to set it up) #623

Closed
tillig opened this issue Oct 16, 2023 · 1 comment
Assignees
Labels
area-test Test discovery, execution, debugging enhancement New feature or request fixed-pending-release
Milestone

Comments

@tillig
Copy link

tillig commented Oct 16, 2023

Describe the feature you'd like

While the dotnet.unitTestDebuggingOptions settings appear to allow for Source Link (to let me step into dependencies) they don't seem to be obeyed. I'd like to be able to step into source using Source Link during unit test debugging.

It is possible I'm just not configuring it properly. I'm on a Mac M1 and I'm using these settings:

{
  "dotnet.unitTestDebuggingOptions": {
    "enableStepFiltering": false,
    "justMyCode": false,
    "requireExactSource": false,
    "sourceLinkOptions": {
      "*": {
        "enabled": true
      }
    },
    "suppressJITOptimizations": true,
    "symbolOptions": {
      "searchNuGetOrgSymbolServer": true
    },
    "targetArchitecture": "arm64"
  }
}

If this already works, providing some clear documentation showing how to set it up would be helpful. There's nothing on the testing page. These are similarly-named to the options listed on the debugger options page for launch.json but for unit testing.

Alternatives considered

  • Switch back to OmniSharp - I recall this working in the OmniSharp version of C# when I last tried it.
  • Create a launch configuration for unit testing - do an end-around the test explorer and execute dotnet test from launch.json instead.

Environment Information

  • OS: Mac OS 14.0 "Sonoma"
  • VS Code Version: 1.83.1
  • Extension Version: v0.5.150
@tillig tillig added the enhancement New feature or request label Oct 16, 2023
@microsoft-issue-labeler microsoft-issue-labeler bot added the area-project Project load, Solution Explorer label Oct 16, 2023
@webreidi webreidi added area-test Test discovery, execution, debugging area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire and removed area-project Project load, Solution Explorer labels Oct 16, 2023
@WardenGnaw WardenGnaw removed the area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire label Oct 23, 2023
@AbhitejJohn AbhitejJohn added this to the Dec2023 milestone Oct 31, 2023
@peterwald
Copy link
Member

Support has been added to C# Dev Kit for the dotnet.unitTestDebuggingOptions. It works in the same way as the C#/OmniSharp extension did, by merging those options into the debug profile when debugging unit tests. They are the same options as what is supported by launch.json.

This will ship in the next preview release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Test discovery, execution, debugging enhancement New feature or request fixed-pending-release
Projects
None yet
Development

No branches or pull requests

5 participants