Browse Source

Add setting ShowDebugInfo

pull/923/head
Siegfried Pammer 8 years ago
parent
commit
79d3ff10a3
  1. 13
      ICSharpCode.Decompiler/DecompilerSettings.cs
  2. 2
      ILSpy/Languages/CSharpILMixedLanguage.cs
  3. 2
      ILSpy/Languages/ILLanguage.cs
  4. 1
      ILSpy/Options/DecompilerSettingsPanel.xaml
  5. 2
      ILSpy/Options/DecompilerSettingsPanel.xaml.cs

13
ICSharpCode.Decompiler/DecompilerSettings.cs

@ -360,6 +360,19 @@ namespace ICSharpCode.Decompiler
} }
} }
} }
bool showDebugInfo;
public bool ShowDebugInfo {
get { return showDebugInfo; }
set {
if (showDebugInfo != value) {
showDebugInfo = value;
OnPropertyChanged();
}
}
}
#endregion #endregion
CSharpFormattingOptions csharpFormattingOptions; CSharpFormattingOptions csharpFormattingOptions;

2
ILSpy/Languages/CSharpILMixedLanguage.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpy
return new ReflectionDisassembler(output, return new ReflectionDisassembler(output,
new MixedMethodBodyDisassembler(output, options) { new MixedMethodBodyDisassembler(output, options) {
DetectControlStructure = detectControlStructure, DetectControlStructure = detectControlStructure,
ShowSequencePoints = true ShowSequencePoints = options.DecompilerSettings.ShowDebugInfo
}, },
options.CancellationToken); options.CancellationToken);
} }

2
ILSpy/Languages/ILLanguage.cs

@ -48,7 +48,7 @@ namespace ICSharpCode.ILSpy
{ {
return new ReflectionDisassembler(output, options.CancellationToken) { return new ReflectionDisassembler(output, options.CancellationToken) {
DetectControlStructure = detectControlStructure, DetectControlStructure = detectControlStructure,
ShowSequencePoints = true ShowSequencePoints = options.DecompilerSettings.ShowDebugInfo
}; };
} }

1
ILSpy/Options/DecompilerSettingsPanel.xaml

@ -11,6 +11,7 @@
<CheckBox IsChecked="{Binding ExpressionTrees}">Decompile expression trees</CheckBox> <CheckBox IsChecked="{Binding ExpressionTrees}">Decompile expression trees</CheckBox>
<CheckBox IsChecked="{Binding AutomaticProperties}">Decompile automatic properties</CheckBox> <CheckBox IsChecked="{Binding AutomaticProperties}">Decompile automatic properties</CheckBox>
<CheckBox IsChecked="{Binding UseDebugSymbols}">Use variable names from debug symbols, if available</CheckBox> <CheckBox IsChecked="{Binding UseDebugSymbols}">Use variable names from debug symbols, if available</CheckBox>
<CheckBox IsChecked="{Binding ShowDebugInfo}">Show info from debug symbols, if available</CheckBox>
<CheckBox IsChecked="{Binding ShowXmlDocumentation}">Show XML documentation in decompiled code</CheckBox> <CheckBox IsChecked="{Binding ShowXmlDocumentation}">Show XML documentation in decompiled code</CheckBox>
<CheckBox IsChecked="{Binding FoldBraces}">Enable folding on all blocks in braces</CheckBox> <CheckBox IsChecked="{Binding FoldBraces}">Enable folding on all blocks in braces</CheckBox>
</StackPanel> </StackPanel>

2
ILSpy/Options/DecompilerSettingsPanel.xaml.cs

@ -58,6 +58,7 @@ namespace ICSharpCode.ILSpy.Options
s.QueryExpressions = (bool?)e.Attribute("queryExpressions") ?? s.QueryExpressions; s.QueryExpressions = (bool?)e.Attribute("queryExpressions") ?? s.QueryExpressions;
s.ExpressionTrees = (bool?)e.Attribute("expressionTrees") ?? s.ExpressionTrees; s.ExpressionTrees = (bool?)e.Attribute("expressionTrees") ?? s.ExpressionTrees;
s.UseDebugSymbols = (bool?)e.Attribute("useDebugSymbols") ?? s.UseDebugSymbols; s.UseDebugSymbols = (bool?)e.Attribute("useDebugSymbols") ?? s.UseDebugSymbols;
s.ShowDebugInfo = (bool?)e.Attribute("showDebugInfo") ?? s.ShowDebugInfo;
s.ShowXmlDocumentation = (bool?)e.Attribute("xmlDoc") ?? s.ShowXmlDocumentation; s.ShowXmlDocumentation = (bool?)e.Attribute("xmlDoc") ?? s.ShowXmlDocumentation;
s.FoldBraces = (bool?)e.Attribute("foldBraces") ?? s.FoldBraces; s.FoldBraces = (bool?)e.Attribute("foldBraces") ?? s.FoldBraces;
return s; return s;
@ -75,6 +76,7 @@ namespace ICSharpCode.ILSpy.Options
section.SetAttributeValue("queryExpressions", s.QueryExpressions); section.SetAttributeValue("queryExpressions", s.QueryExpressions);
section.SetAttributeValue("expressionTrees", s.ExpressionTrees); section.SetAttributeValue("expressionTrees", s.ExpressionTrees);
section.SetAttributeValue("useDebugSymbols", s.UseDebugSymbols); section.SetAttributeValue("useDebugSymbols", s.UseDebugSymbols);
section.SetAttributeValue("showDebugInfo", s.ShowDebugInfo);
section.SetAttributeValue("xmlDoc", s.ShowXmlDocumentation); section.SetAttributeValue("xmlDoc", s.ShowXmlDocumentation);
section.SetAttributeValue("foldBraces", s.FoldBraces); section.SetAttributeValue("foldBraces", s.FoldBraces);

Loading…
Cancel
Save