Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Remove DebuggerDisplayAttribute #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Confuser.Core/ConfuserEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,16 @@ static void OptimizeMethods(ConfuserContext context) {
}

static void EndModule(ConfuserContext context) {

foreach (var module in context.Modules)
foreach (var type in module.Types)
for (int i = type.CustomAttributes.Count - 1; i > -1; --i)
{
var attribute = type.CustomAttributes[i];
if (attribute.AttributeType.FullName == "System.Diagnostics.DebuggerDisplayAttribute")
type.CustomAttributes.Remove(attribute);
}

string output = context.Modules[context.CurrentModuleIndex].Location;
if (output != null) {
if (!Path.IsPathRooted(output))
Expand Down Expand Up @@ -535,4 +545,4 @@ static void PrintEnvironmentInfo(ConfuserContext context) {
context.Logger.Error("---END DEBUG INFO---");
}
}
}
}