Load debug symbols (.mdb on mono only; .pdb on .NET only) for mods if they are present

This commit is contained in:
Jean-Rémy Buchs
2017-03-16 17:22:59 +01:00
parent 28cd480225
commit fbd3a2efea

View File

@@ -63,8 +63,8 @@ namespace OpenRA
if (isMonoRuntime)
hasSymbols = modFiles.TryOpen(path + ".mdb", out symbolStream);
// .NET and newer mono versions can load portable .pdb files.
if (!hasSymbols)
// .NET uses .pdb files.
else
hasSymbols = modFiles.TryOpen(path.Substring(0, path.Length - 4) + ".pdb", out symbolStream);
assembly = hasSymbols ? Assembly.Load(data, symbolStream.ReadAllBytes()) : Assembly.Load(data);