public DebugSession(IApplicationEngine engine, IReadOnlyList <DebugInfo> debugInfoList, IReadOnlyList <string> returnTypes, Action <DebugEvent> sendEvent, DebugView defaultDebugView) { this.engine = engine; this.returnTypes = returnTypes; this.sendEvent = sendEvent; debugInfoMap = debugInfoList.ToDictionary(di => di.ScriptHash); disassemblyView = defaultDebugView == DebugView.Disassembly; disassemblyManager = new DisassemblyManager(TryGetScript, debugInfoMap.TryGetValue); breakpointManager = new BreakpointManager(disassemblyManager, debugInfoList); this.engine.DebugNotify += OnNotify; this.engine.DebugLog += OnLog; }
public DebugSession(IApplicationEngine engine, IReadOnlyList <DebugInfo> debugInfoList, IReadOnlyList <CastOperation> returnTypes, Action <DebugEvent> sendEvent, DebugView defaultDebugView) { this.engine = engine; this.returnTypes = returnTypes; this.sendEvent = sendEvent; debugInfoMap = debugInfoList.ToDictionary(di => di.ScriptHash); disassemblyView = defaultDebugView == DebugView.Disassembly; disassemblyManager = new DisassemblyManager(TryGetScript, debugInfoMap.TryGetValue); breakpointManager = new BreakpointManager(disassemblyManager, debugInfoList); this.engine.DebugNotify += OnNotify; this.engine.DebugLog += OnLog; if (engine.SupportsStepBack) { sendEvent(new CapabilitiesEvent { Capabilities = new Capabilities { SupportsStepBack = true } }); } }