Runtime: Question - What is the Difference between Debug Type Full & Pdb

Created on 21 Mar 2018  路  7Comments  路  Source: dotnet/runtime

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

area-System.Diagnostics documentation

Most helpful comment

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

All 7 comments

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

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

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?

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

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

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yahorsi picture yahorsi  路  3Comments

iCodeWebApps picture iCodeWebApps  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments

omariom picture omariom  路  3Comments

EgorBo picture EgorBo  路  3Comments