Add breakpoints to UIX interpreter

This commit is contained in:
Yoshi Askharoun
2023-04-28 18:46:37 -05:00
parent 472361c839
commit 862c87fa66
2 changed files with 13 additions and 2 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
using System.Xml; using System.Collections.Generic;
using System.Xml;
#if NET40_OR_GREATER || NET6_0_OR_GREATER #if NET40_OR_GREATER || NET6_0_OR_GREATER
using DataMappingModelsList = System.Collections.ObjectModel.ObservableCollection<Microsoft.Iris.Debug.DataMappingModel>; using DataMappingModelsList = System.Collections.ObjectModel.ObservableCollection<Microsoft.Iris.Debug.DataMappingModel>;
@@ -20,6 +21,8 @@ namespace Microsoft.Iris.Debug
public bool GenerateDataMappingModels { get; set; } = false; public bool GenerateDataMappingModels { get; set; } = false;
public DataMappingModelsList DataMappingModels { get; } = new DataMappingModelsList(); public DataMappingModelsList DataMappingModels { get; } = new DataMappingModelsList();
public List<string> Breakpoints { get; } = new List<string>();
public Bridge Bridge { get; } = public Bridge Bridge { get; } =
#if OPENZUNE #if OPENZUNE
new(OwlCore.Remoting.RemotingMode.None); new(OwlCore.Remoting.RemotingMode.None);
+9 -1
View File
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Markup
byteCodeReader = context.LoadResult.ObjectSection; byteCodeReader = context.LoadResult.ObjectSection;
num = (long)((ulong)byteCodeReader.CurrentOffset); num = (long)((ulong)byteCodeReader.CurrentOffset);
byteCodeReader.CurrentOffset = context.InitialBytecodeOffset; byteCodeReader.CurrentOffset = context.InitialBytecodeOffset;
if (Application.DebugSettings.UseDecompiler) if (Application.DebugSettings.UseDecompiler || Application.DebugSettings.Breakpoints.Contains(context.ToString()))
result = RunDecompile(context, byteCodeReader); result = RunDecompile(context, byteCodeReader);
else else
result = Run(context, byteCodeReader); result = Run(context, byteCodeReader);
@@ -380,6 +380,10 @@ namespace Microsoft.Iris.Markup
break; break;
} }
} }
//if (methodSchema.Name == "PlayItems")
// System.Diagnostics.Debugger.Break();
object obj11 = methodSchema.Invoke(instance4, array2); object obj11 = methodSchema.Invoke(instance4, array2);
if (!ErrorsDetected(watermark, ref result, ref flag)) if (!ErrorsDetected(watermark, ref result, ref flag))
{ {
@@ -1311,6 +1315,10 @@ namespace Microsoft.Iris.Markup
break; break;
} }
} }
if (methodSchema.Name == "PlayOrPreview")
System.Diagnostics.Debugger.Break();
object obj11 = methodSchema.Invoke(instance4, array2); object obj11 = methodSchema.Invoke(instance4, array2);
if (!ErrorsDetected(watermark, ref result, ref flag)) if (!ErrorsDetected(watermark, ref result, ref flag))
{ {