Skip to content

Compiler generates debug symbol document record 'unknown' #11195

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

Closed
marklam opened this issue Mar 8, 2021 · 2 comments
Closed

Compiler generates debug symbol document record 'unknown' #11195

marklam opened this issue Mar 8, 2021 · 2 comments
Labels
Area-Debug stepping, debug points, stacks and more Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@marklam
Copy link

marklam commented Mar 8, 2021

Inlining (some complicated) code from another assembly causes the pdb symbols to contain a reference to a file called 'unknown'.
This breaks code coverage tools like coverlet, because it skips the assembly when it can't find an on-disk file called 'unknown'.

Repro steps

  1. Create some very complicated code to inline
  2. Reference that code from another assembly
  3. Check the Documents in the debug metadata

I've created a repo which does these steps and put it in github: https://github.com/marklam/FSharpPdbUnknown
(If a zip is preferred, https://github.com/marklam/FSharpPdbUnknown/archive/master.zip should do it)

Expected behavior

The documents in the PDB (which the referenced project can automatically list) should only contain 'Program.fs'

Actual behavior

The documents include 'Program.fs' and 'unknown'

Known workarounds

Dropping an empty file called 'unknown' in the source directory will make Coverlet happy about producing coverage for the assembly.

Related information

  • Operating system Windows 10
  • .NET Runtime kind .net core 5
  • Editing Tools Visual Studio 16.9
@baronfel
Copy link
Member

Worth noting that this file comes from uses of the range0 member (eg from anonymous record codegen), but would likely come from anywhere the rangeStartup or rangeCommandLineArgs members were exposed as well. I'm not sure if there's a reasonable workaround from the compiler's point of view for these cases...

@KevinRansom KevinRansom added the Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. label Jul 14, 2021
@dsyme
Copy link
Contributor

dsyme commented Feb 15, 2022

I checked the repro and it no longer generates unknown using main

The problem may still be around though - looking at the code it's a FeeFee debug point with file name unknown

I'll close this until we get another repro

@dsyme dsyme closed this as completed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debug stepping, debug points, stacks and more Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

No branches or pull requests

5 participants