mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
Add new, more robust Breakpoint struct
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Microsoft.Iris.Debug;
|
||||||
|
|
||||||
|
public struct Breakpoint : IEquatable<Breakpoint>
|
||||||
|
{
|
||||||
|
public Breakpoint(string uri, int line, int column)
|
||||||
|
{
|
||||||
|
Uri = uri;
|
||||||
|
Line = line;
|
||||||
|
Column = column;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Uri { get; set; }
|
||||||
|
|
||||||
|
public int Line { get; set; }
|
||||||
|
|
||||||
|
public int Column { get; set; }
|
||||||
|
|
||||||
|
public bool Equals(string uri, int line, int column) => uri == Uri && line == Line && column == Column;
|
||||||
|
|
||||||
|
public bool Equals(Breakpoint other) => Equals(other.Uri, other.Line, other.Column);
|
||||||
|
|
||||||
|
public static bool operator ==(Breakpoint left, Breakpoint right) => left.Equals(right);
|
||||||
|
|
||||||
|
public static bool operator !=(Breakpoint left, Breakpoint right) => !(left == right);
|
||||||
|
|
||||||
|
public override bool Equals(object obj) => obj is Breakpoint bp && Equals(bp);
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ 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 List<Breakpoint> Breakpoints { get; } = new();
|
||||||
|
|
||||||
public string DebugConnectionUri { get; set; }
|
public string DebugConnectionUri { get; set; }
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ namespace Microsoft.Iris.Debug
|
|||||||
|
|
||||||
public class DataMappingModel
|
public class DataMappingModel
|
||||||
{
|
{
|
||||||
internal DataMappingModel(string provider, string type, string generatedCode)
|
public DataMappingModel(string provider, string type, string generatedCode)
|
||||||
{
|
{
|
||||||
Provider = provider;
|
Provider = provider;
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|||||||
@@ -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 || Application.DebugSettings.Breakpoints.Contains(context.ToString()))
|
if (Application.DebugSettings.UseDecompiler)
|
||||||
result = RunDecompile(context, byteCodeReader);
|
result = RunDecompile(context, byteCodeReader);
|
||||||
else
|
else
|
||||||
result = Run(context, byteCodeReader);
|
result = Run(context, byteCodeReader);
|
||||||
|
|||||||
Reference in New Issue
Block a user