mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 22:05:55 +00:00
fix(@embark/debugger): Re-enable debugger
Re-enable debugger for cockpit and console. Add missing request `blockchain:getTransaction` required to start a debugging session. Fix error in console when stopping a debug session.
This commit is contained in:
parent
bd4b110a78
commit
8e0f8b44d1
@ -162,6 +162,7 @@ class EmbarkController {
|
|||||||
engine.registerModuleGroup("storage");
|
engine.registerModuleGroup("storage");
|
||||||
engine.registerModuleGroup("cockpit");
|
engine.registerModuleGroup("cockpit");
|
||||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||||
|
engine.registerModulePackage("embark-debugger");
|
||||||
|
|
||||||
// load custom plugins
|
// load custom plugins
|
||||||
engine.loadDappPlugins();
|
engine.loadDappPlugins();
|
||||||
@ -391,6 +392,7 @@ class EmbarkController {
|
|||||||
engine.registerModuleGroup("cockpit");
|
engine.registerModuleGroup("cockpit");
|
||||||
}
|
}
|
||||||
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
|
||||||
|
engine.registerModulePackage("embark-debugger");
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
|
@ -275,9 +275,9 @@ class TransactionDebugger {
|
|||||||
this.embark.logger.warn(NO_DEBUG_SESSION);
|
this.embark.logger.warn(NO_DEBUG_SESSION);
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
this.cmdDebugger = null;
|
|
||||||
this.embark.logger.info(__('The debug session has been stopped'));
|
|
||||||
this.cmdDebugger.unload();
|
this.cmdDebugger.unload();
|
||||||
|
this.cmdDebugger = null;
|
||||||
|
callback(undefined, __('The debug session has been stopped'));
|
||||||
},
|
},
|
||||||
usage: ' stop debugger/sd',
|
usage: ' stop debugger/sd',
|
||||||
});
|
});
|
||||||
|
@ -44,6 +44,7 @@ export default class EthereumAPI {
|
|||||||
this.embark.events.request("blockchain:request:register", this.blockchainName, "getBlock", this.getBlock.bind(this));
|
this.embark.events.request("blockchain:request:register", this.blockchainName, "getBlock", this.getBlock.bind(this));
|
||||||
this.embark.events.request("blockchain:request:register", this.blockchainName, "getGasPrice", this.getGasPrice.bind(this));
|
this.embark.events.request("blockchain:request:register", this.blockchainName, "getGasPrice", this.getGasPrice.bind(this));
|
||||||
this.embark.events.request("blockchain:request:register", this.blockchainName, "getNetworkId", this.getNetworkId.bind(this));
|
this.embark.events.request("blockchain:request:register", this.blockchainName, "getNetworkId", this.getNetworkId.bind(this));
|
||||||
|
this.embark.events.request("blockchain:request:register", this.blockchainName, "getTransaction", this.getTransactionByHash.bind(this));
|
||||||
this.embark.events.request("blockchain:request:register", this.blockchainName, "contractObject", this.contractObject.bind(this));
|
this.embark.events.request("blockchain:request:register", this.blockchainName, "contractObject", this.contractObject.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +114,11 @@ export default class BlockchainAPI {
|
|||||||
cb(getNetworkId);
|
cb(getNetworkId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.events.setCommandHandler("blockchain:getTransaction", async (txId, cb) => {
|
||||||
|
const getTransaction = this.getRequestForBlockchain(blockchainName, "getTransaction");
|
||||||
|
getTransaction(txId, cb);
|
||||||
|
});
|
||||||
|
|
||||||
this.events.setCommandHandler("blockchain:contract:create", (params, cb) => {
|
this.events.setCommandHandler("blockchain:contract:create", (params, cb) => {
|
||||||
const contractObject = this.getRequestForBlockchain(blockchainName, "contractObject")(params);
|
const contractObject = this.getRequestForBlockchain(blockchainName, "contractObject")(params);
|
||||||
cb(contractObject);
|
cb(contractObject);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user