Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Use "portable" PDB files#758

Merged
mattleibow merged 1 commit intoxamarin:masterfrom
jonathanpeppers:debugtype-portable
Apr 4, 2019
Merged

Use "portable" PDB files#758
mattleibow merged 1 commit intoxamarin:masterfrom
jonathanpeppers:debugtype-portable

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Description of Change

Context: https://github.com/dotnet/core/blob/79c19c12ab2bc11912551bb0c3025f602cd541d9/Documentation/diagnostics/portable_pdb.md

In doing some performance testing with builds in VS 2019, I noticed:

115 ms  _ConvertPdbFiles                           1 calls

And looking at files were converted:

ConvertDebuggingFiles
    Parameters
        Files
            C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.pdb
    [Output] ConvertedFiles:
        C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.dll

The Xamarin.Essentials NuGet package is shipping a non-portable PDB
file. This is a Windows-specific format that Mono doesn't support.

Xamarin.Android runs a tool called pdb2mdb when it encounters a
non-portable PDB file so symbols be converted to something that Mono
can use. If you have DebugType=full or DebugType=pdbonly,
Xamarin.Android has to do this extra work to convert it.

I see no drawbacks to just use DebugType=portable in this project
all the time?

Since Xamarin.Essentials uses sourcelink, I double-checked and they
support portable PDBs:

https://github.com/dotnet/sourcelink#prerequisites-for-net-projects

I sent a similar PR to Xamarin.Forms, shipping since 3.4. I wrote a
bit more detail on symbol files there if you need more info:

xamarin/Xamarin.Forms#4201

Bugs Fixed

None filed, I just saw this when doing perf work with VS 2019.

API Changes

n/a

Behavioral Changes

Initial build times should improve by ~100ms.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

Context: https://github.com/dotnet/core/blob/79c19c12ab2bc11912551bb0c3025f602cd541d9/Documentation/diagnostics/portable_pdb.md

In doing some performance testing with builds in VS 2019, I noticed:

    115 ms  _ConvertPdbFiles                           1 calls

And looking at files were converted:

    ConvertDebuggingFiles
        Parameters
            Files
                C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.pdb
        [Output] ConvertedFiles:
            C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.dll

The Xamarin.Essentials NuGet package is shipping a non-portable PDB
file. This is a Windows-specific format that Mono doesn't support.

Xamarin.Android runs a tool called `pdb2mdb` when it encounters a
non-portable PDB file so symbols be converted to something that Mono
can use. If you have `DebugType=full` or `DebugType=pdbonly`,
Xamarin.Android has to do this extra work to convert it.

I see no drawbacks to just use `DebugType=portable` in this project
all the time?

Since Xamarin.Essentials uses sourcelink, I double-checked and they
support portable PDBs:

https://github.com/dotnet/sourcelink#prerequisites-for-net-projects

I sent a similar PR to Xamarin.Forms, shipping since 3.4. I wrote a
bit more detail on symbol files there if you need more info:

xamarin/Xamarin.Forms#4201
@ghost
Copy link
Copy Markdown

ghost commented Apr 3, 2019

Docs Build status updates of commit 2962481:

✅ Validation status: passed

File Status Preview URL Details
Xamarin.Essentials/Xamarin.Essentials.csproj ✅Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@mattleibow mattleibow merged commit 2d0af33 into xamarin:master Apr 4, 2019
@jonathanpeppers jonathanpeppers deleted the debugtype-portable branch April 4, 2019 15:16
Mrnikbobjeff pushed a commit to Mrnikbobjeff/Essentials that referenced this pull request Aug 28, 2019
Context: https://github.com/dotnet/core/blob/79c19c12ab2bc11912551bb0c3025f602cd541d9/Documentation/diagnostics/portable_pdb.md

In doing some performance testing with builds in VS 2019, I noticed:

    115 ms  _ConvertPdbFiles                           1 calls

And looking at files were converted:

    ConvertDebuggingFiles
        Parameters
            Files
                C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.pdb
        [Output] ConvertedFiles:
            C:\ProgramData\Xamarin\NuGet\xamarin.essentials\1.0.1\lib\monoandroid81\Xamarin.Essentials.dll

The Xamarin.Essentials NuGet package is shipping a non-portable PDB
file. This is a Windows-specific format that Mono doesn't support.

Xamarin.Android runs a tool called `pdb2mdb` when it encounters a
non-portable PDB file so symbols be converted to something that Mono
can use. If you have `DebugType=full` or `DebugType=pdbonly`,
Xamarin.Android has to do this extra work to convert it.

I see no drawbacks to just use `DebugType=portable` in this project
all the time?

Since Xamarin.Essentials uses sourcelink, I double-checked and they
support portable PDBs:

https://github.com/dotnet/sourcelink#prerequisites-for-net-projects

I sent a similar PR to Xamarin.Forms, shipping since 3.4. I wrote a
bit more detail on symbol files there if you need more info:

xamarin/Xamarin.Forms#4201
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants