Merge branch '1.1' into 1.2

# Conflicts:
#	Source/Platforms/DotNet/Newtonsoft.Json.dll
#	Source/Platforms/DotNet/Newtonsoft.Json.pdb
#	Source/Platforms/UWP/Binaries/Newtonsoft.Json.dll
#	Source/Platforms/XboxOne/Binaries/Newtonsoft.Json.dll
This commit is contained in:
Wojtek Figat
2021-04-24 12:32:17 +02:00
43 changed files with 820 additions and 245 deletions

View File

@@ -326,6 +326,24 @@ bool MAssembly::LoadWithImage(const String& assemblyPath)
mono_debug_open_image_from_memory(assemblyImage, _debugData.Get(), _debugData.Count());
}
}
#if 0
// Hack to load debug information for Newtonsoft.Json (enable it to debug C# code of json lib)
if (assemblyPath.EndsWith(TEXT("FlaxEngine.CSharp.dll")))
{
static Array<byte> NewtonsoftJsonDebugData;
File::ReadAllBytes(StringUtils::GetDirectoryName(assemblyPath) / TEXT("Newtonsoft.Json.pdb"), NewtonsoftJsonDebugData);
if (NewtonsoftJsonDebugData.HasItems())
{
StringAnsi tmp(StringUtils::GetDirectoryName(assemblyPath) / TEXT("Newtonsoft.Json.dll"));
MonoAssembly* a = mono_assembly_open(tmp.Get(), &status);
if (a)
{
mono_debug_open_image_from_memory(mono_assembly_get_image(a), NewtonsoftJsonDebugData.Get(), NewtonsoftJsonDebugData.Count());
}
}
}
#endif
#endif
// Set state