Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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
                    }
                });
            }
        }
Exemplo n.º 3
0
 public BreakpointManager(DisassemblyManager disassemblyManager, IReadOnlyList <DebugInfo> debugInfoList)
 {
     this.disassemblyManager = disassemblyManager;
     this.debugInfoList      = debugInfoList;
 }