From 128d8750fe9039fd03d0c3b5e8a860808eb19bb6 Mon Sep 17 00:00:00 2001 From: Wil Chung <10446+iamwilhelm@users.noreply.github.com> Date: Thu, 26 Jul 2018 11:32:46 -0700 Subject: [PATCH] Incorrect sample code The require is wrong, and the order of arguments for setting a provider is wrong. --- remix-debug/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/remix-debug/README.md b/remix-debug/README.md index f198c26d75..363f3cd983 100644 --- a/remix-debug/README.md +++ b/remix-debug/README.md @@ -16,7 +16,7 @@ npm install remix-debug ```javascript var Debugger = require('remix-debug').EthDebugger -var BreakpointManager = require('remix-debug').EthDebugger +var BreakpointManager = require('remix-debug').BreakpointManager var debugger = new Debugger({ compilationResult: () => { @@ -24,7 +24,10 @@ var debugger = new Debugger({ } }) -debugger.addProvider(web3, 'web3') +// Sample http provider, but your url or provider may be different. +var web3Provider = new Web3.providers.HttpProvider("http://localhost:7545") + +debugger.addProvider('web3', web3Provider) debugger.switchProvider('web3') var breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => {