Compare-Net-Objects: ShowBreadcrumb does not output trace in release build / nuget install
We would like to use ShowBreadcrumb to diagnose some performance problems probably caused by excessively deep recursion into our objects (we have previously used it successfully like this).
However, there’s a minor stumbling-block: BaseComparer.AddBreadCrumb contains the following code:
if (config.ShowBreadcrumb)
Debug.WriteLine(sb.ToString());
The problem is that a release build (and hence the Nuget package) compiles Debug.WriteLine away to nothing, so this doesn’t work unless you pull the source and build your own Debug build (which is what we did last time we needed this feature).
Is there another way to use ShowBreadcrumb in a release/nuget install, or should this line actually say Trace.WriteLine(sb.ToString) so that the call stays active in the release build?
If this is a bug, would you like a (trivial) PR?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (9 by maintainers)
Fixed:
https://github.com/GregFinzer/Compare-Net-Objects/releases/tag/4.54.0 https://www.nuget.org/packages/CompareNETObjects/4.54.0