Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
49610eb9
Commit
49610eb9
authored
Jul 15, 2016
by
yann300
Committed by
GitHub
Jul 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #57 from yann300/fea1
start external debugging
parents
a050304f
2bcb5107
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
index.js
index.js
+2
-0
Ethdebugger.js
src/Ethdebugger.js
+11
-2
TxBrowser.js
src/TxBrowser.js
+6
-0
init.js
src/helpers/init.js
+4
-0
No files found.
index.js
0 → 100644
View file @
49610eb9
var
Debugger
=
require
(
'./src/Ethdebugger'
)
module
.
exports
=
Debugger
src/Ethdebugger.js
View file @
49610eb9
...
@@ -11,15 +11,20 @@ var yo = require('yo-yo')
...
@@ -11,15 +11,20 @@ var yo = require('yo-yo')
var
init
=
require
(
'./helpers/init'
)
var
init
=
require
(
'./helpers/init'
)
var
ui
=
require
(
'./helpers/ui'
)
var
ui
=
require
(
'./helpers/ui'
)
function
Ethdebugger
()
{
function
Ethdebugger
(
_web3
)
{
util
.
extend
(
this
,
new
EventManager
())
util
.
extend
(
this
,
new
EventManager
())
this
.
currentStepIndex
=
-
1
this
.
currentStepIndex
=
-
1
this
.
tx
this
.
tx
this
.
statusMessage
=
''
this
.
statusMessage
=
''
this
.
view
this
.
view
if
(
_web3
)
{
this
.
web3
=
_web3
init
.
extendWeb3
(
this
.
web3
)
}
else
{
this
.
web3
=
init
.
loadWeb3
()
this
.
web3
=
init
.
loadWeb3
()
}
this
.
traceManager
=
new
TraceManager
(
this
.
web3
)
this
.
traceManager
=
new
TraceManager
(
this
.
web3
)
var
self
=
this
var
self
=
this
...
@@ -41,6 +46,10 @@ function Ethdebugger () {
...
@@ -41,6 +46,10 @@ function Ethdebugger () {
this
.
sticker
=
new
Sticker
(
this
,
this
.
traceManager
,
this
.
web3
)
this
.
sticker
=
new
Sticker
(
this
,
this
.
traceManager
,
this
.
web3
)
}
}
Ethdebugger
.
prototype
.
debug
=
function
(
tx
)
{
this
.
txBrowser
.
load
(
tx
.
hash
)
}
Ethdebugger
.
prototype
.
render
=
function
()
{
Ethdebugger
.
prototype
.
render
=
function
()
{
var
view
=
yo
`<div style=
${
ui
.
formatCss
(
style
.
font
)}
>
var
view
=
yo
`<div style=
${
ui
.
formatCss
(
style
.
font
)}
>
<h1 style=
${
ui
.
formatCss
(
style
.
container
)}
>VM Debugger</h1>
<h1 style=
${
ui
.
formatCss
(
style
.
container
)}
>VM Debugger</h1>
...
...
src/TxBrowser.js
View file @
49610eb9
...
@@ -102,6 +102,12 @@ TxBrowser.prototype.updateTxN = function (ev) {
...
@@ -102,6 +102,12 @@ TxBrowser.prototype.updateTxN = function (ev) {
this
.
txNumber
=
ev
.
target
.
value
this
.
txNumber
=
ev
.
target
.
value
}
}
TxBrowser
.
prototype
.
load
=
function
(
txHash
)
{
this
.
txNumber
=
txHash
yo
.
update
(
this
.
view
,
this
.
render
())
this
.
submit
()
}
TxBrowser
.
prototype
.
init
=
function
(
ev
)
{
TxBrowser
.
prototype
.
init
=
function
(
ev
)
{
this
.
setDefaultValues
()
this
.
setDefaultValues
()
yo
.
update
(
this
.
view
,
this
.
render
())
yo
.
update
(
this
.
view
,
this
.
render
())
...
...
src/helpers/init.js
View file @
49610eb9
...
@@ -10,6 +10,10 @@ module.exports = {
...
@@ -10,6 +10,10 @@ module.exports = {
return
web3
return
web3
},
},
extendWeb3
:
function
(
web3
)
{
Web3Admin
.
extend
(
web3
)
},
setProvider
:
function
(
web3
,
url
)
{
setProvider
:
function
(
web3
,
url
)
{
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
url
))
web3
.
setProvider
(
new
web3
.
providers
.
HttpProvider
(
url
))
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment