Skip to content

Question - What is the Difference between Debug Type Full & Pdb #25550

Closed

Description

@keyoke

Hi,
I have a question regarding the build output when setting the Debug Type Full or Pdb-Only in project properties on .NET Core. As far as I could see the assemblies produced are the same? I also don't see any difference in the pdb files which are produced... but maybe am missing something.

In full framework there is definitely a difference and it could have perf impact on resulting code, should we have the same concerns on .NET Core? or is it a non-issue.

_"One difference between -debug:pdbonly and -debug:full is that with -debug:full the compiler emits a DebuggableAttribute, which is used to tell the JIT compiler that debug information is available. Therefore, you will get an error if your code contains the DebuggableAttribute set to false if you use -debug:full. " - https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/debug-compiler-option

Thanks

Activity

  1. gfoidl commented on Mar 21, 2018

    @gfoidl
    Member

    Have a look at Portable PDB -- hope this clarifies.

  2. keyoke commented on Mar 21, 2018

    @keyoke
    Author

    thanks that's interesting read but there is no mention regarding any possible Perf impact

  3. gfoidl commented on Mar 21, 2018

    @gfoidl
    Member

    It's for debugging. So there should be no influence when in Release and w/o debugger.

    Do you have any concrete perf-problem, or just a informational question?

  4. keyoke commented on Mar 21, 2018

    @keyoke
    Author

    ok thanks, the confusion for me was that for Full Framework our docs say there is a potential perf impact? I was wondering if this still applied for .NET Core, they also emit an additional attribute but I didn't see this in the produced assemblies so I guess this also doesn't apply .NET Core?

    "If you use -debug:full, be aware that there is some impact on the speed and size of JIT optimized code and a small impact on code quality with -debug:full. We recommend -debug:pdbonly or no PDB for generating release code. "

    _"One difference between -debug:pdbonly and -debug:full is that with -debug:full the compiler emits a DebuggableAttribute, which is used to tell the JIT compiler that debug information is available. Therefore, you will get an error if your code contains the DebuggableAttribute set to false if you use -debug:full. " - https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/debug-compiler-option

  5. karelz commented on Mar 21, 2018

    @karelz
    Member

    @tmat @noahfalk @mikem8361 do you have any insights?

  6. tmat commented on Mar 21, 2018

    @tmat
    Member

    There is no difference between full and pdb-only since Visual Studio 2013 (Roslyn). We should update the docs. @VSadov

  7. stephentoub commented on May 3, 2018

    @stephentoub
    Member

    @mairaw, anything you want to do for the docs regarding the above?

    I'm going to close this issue, as there's nothing left to do for corefx.

  8. transferred this issue fromdotnet/corefxon Jan 31, 2020
  9. added this to the 3.0 milestone on Jan 31, 2020
  10. ghost locked as resolved and limited conversation to collaborators on Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Diagnosticsdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions