Incorrect sample code

The require is wrong, and the order of arguments for setting a provider is wrong.
pull/5370/head
Wil Chung 6 years ago committed by GitHub
parent c76244d6ad
commit 128d8750fe
  1. 7
      remix-debug/README.md

@ -16,7 +16,7 @@ npm install remix-debug
```javascript ```javascript
var Debugger = require('remix-debug').EthDebugger var Debugger = require('remix-debug').EthDebugger
var BreakpointManager = require('remix-debug').EthDebugger var BreakpointManager = require('remix-debug').BreakpointManager
var debugger = new Debugger({ var debugger = new Debugger({
compilationResult: () => { 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') debugger.switchProvider('web3')
var breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => { var breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => {

Loading…
Cancel
Save