Unable to Step Into Third Party Code
See original GitHub issueSummary
Pdb generation works fine, but third party code can’t be stepped into.
System
Windows 10, VS 15.8.8.
Description
I’ve got a simple class library with the following csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
</ItemGroup>
</Project>
This works fine. A valid pdb is included when i generate a package. I’ve tested the pdb with the SourceLink command line tool:
sourcelink test .\Test.AzurePipelines.pdb
sourcelink test passed: .\Test.AzurePipelines.pdb
sourcelink print-json .\Test.AzurePipelines.pdb
{"documents":{"C:\\Projects\\Test.AzurePipelines\\*":"https://raw.githubusercontent.com/JeremyTCD/Test.AzurePipelines/74d8b24ebde6ec0d9e38ad1355bafae1356da993/*"}}
sourcelink print-urls .\Test.AzurePipelines.pdb
178770449866fd131ae2150699c6b8a494e566ce sha1 csharp C:\Projects\Test.AzurePipelines\src\Test.AzurePipelines\Class1.cs
https://raw.githubusercontent.com/JeremyTCD/Test.AzurePipelines/74d8b24ebde6ec0d9e38ad1355bafae1356da993/src/Test.AzurePipelines/Class1.cs
d19483e16d67ae4da6e044d3fdeb35dd87480282 sha1 csharp C:\Users\Jeremy\AppData\Local\Temp\.NETStandard,Version=v2.0.AssemblyAttributes.cs
embedded
The urls have been checked manually and they work fine.
I’ve published the package to a local nuget feed:
dotnet pack -c Release
nuget push .\Test.AzurePipelines.2.0.0.nupkg -src "D://NugetLocalFeed"
And I’ve referenced it from a test console application with the following csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Test.AzurePipelines" Version="2.0.0" />
</ItemGroup>
</Project>
I’ve disabled Just My Code
and enabled Source Link Support
:
The pdb loads fine:
The SourceLink command line tool indicates that the pdb in the image is valid.
Unfortunately, I still can’t step into my class library’s functions. F11 just steps over functions. Am I doing something wrong? I’ve gotten SourceLink to work before once, but it was using an older version of VS. Unfortunately I can’t rollback my VS version. Anyone else having trouble with VS 15.8.8 and SourceLink?
Edit: Doesn’t work on 15.9.0 Preview 4.0 either.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
After some clicking around, I think VS might be the problem. F11 does not work, but “Step Into Specific” from the context menu works:
Whats happening in the gif:
ToLower
invocation.ToLower
invocation.ToLower
.Not sure if my VS is just scuffed. If this is the case for everyone, might be a good idea to document that F11 doesn’t step into third party sources.
Thanks for the follow up. It’s worth checking in the modules window to see what version of the coreclr runtime you are actually running on, as this is the version of the coreclr debugger you will be running with. Starting with 2.0, the shared framework/runtime is supposed to be forward compatible. That is, if you have only .NET Core 2.1 installed and you run a netcoreapp2.0 on the shared framework, it will happily run on the 2.1 runtime.
I believe in my testing I looked at coreclr versions 2.0.9 and 2.1.5 (or something).
This shouldn’t matter for net461, so I’m surprised you are not seeing those work.