From e09d21e5c7bb89f5c98579e773216ed7133344ad Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 11 Dec 2020 20:45:48 +0530 Subject: [PATCH] debugger src updated --- libs/remix-debug/src/debugger/VmDebugger.ts | 30 ++++++++++++++------- libs/remix-debug/src/debugger/debugger.ts | 9 +++---- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/libs/remix-debug/src/debugger/VmDebugger.ts b/libs/remix-debug/src/debugger/VmDebugger.ts index d92166c56d..3f4aaa4edc 100644 --- a/libs/remix-debug/src/debugger/VmDebugger.ts +++ b/libs/remix-debug/src/debugger/VmDebugger.ts @@ -1,13 +1,27 @@ -const remixLib = require('@remix-project/remix-lib') const EventManager = require('../eventManager') -const ui = remixLib.helpers.ui const StorageResolver = require('../storage/storageResolver') const StorageViewer = require('../storage/storageViewer') - -const DebuggerSolidityState = require('./solidityState') -const DebuggerSolidityLocals = require('./solidityLocals') - -class VmDebuggerLogic { +import { helpers } from '@remix-project/remix-lib' +import { DebuggerSolidityState } from './solidityState' +import { DebuggerSolidityLocals } from './solidityLocals' +const ui = helpers.ui + +export class VmDebuggerLogic { + + event + debugger + stepManager + _traceManager + _codeManager + _solidityProxy + _callTree + storageResolver + tx + debuggerSolidityState + debuggerSolidityLocals + address + traceLength + addresses constructor (_debugger, tx, _stepManager, _traceManager, _codeManager, _solidityProxy, _callTree) { this.event = new EventManager() @@ -247,5 +261,3 @@ class VmDebuggerLogic { } } - -module.exports = VmDebuggerLogic diff --git a/libs/remix-debug/src/debugger/debugger.ts b/libs/remix-debug/src/debugger/debugger.ts index 733fd910eb..ebdd12c2ac 100644 --- a/libs/remix-debug/src/debugger/debugger.ts +++ b/libs/remix-debug/src/debugger/debugger.ts @@ -2,10 +2,9 @@ const Ethdebugger = require('../Ethdebugger') const EventManager = require('../eventManager') const traceHelper = require('../trace/traceHelper') -const BreakpointManager = require('../code/breakpointManager') - -const StepManager = require('./stepManager') -const VmDebuggerLogic = require('./VmDebugger') +import { BreakpointManager } from '../code/breakpointManager' +import { DebuggerStepManager } from './stepManager' +import { VmDebuggerLogic } from './VmDebugger' export class Debugger { @@ -135,7 +134,7 @@ export class Debugger { } debugTx (tx, loadingCb) { - this.step_manager = new StepManager(this.debugger, this.debugger.traceManager) + this.step_manager = new DebuggerStepManager(this.debugger, this.debugger.traceManager) this.debugger.codeManager.event.register('changed', this, (code, address, instIndex) => { this.debugger.callTree.sourceLocationTracker.getValidSourceLocationFromVMTraceIndex(address, this.step_manager.currentStepIndex, this.debugger.solidityProxy.contracts).then((sourceLocation) => {