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
08e13f1f
Commit
08e13f1f
authored
Sep 20, 2017
by
yann300
Committed by
GitHub
Sep 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #800 from ethereum/fixDebugger
Small Fixes
parents
adcf81d3
3510e93b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
9 deletions
+20
-9
app.js
src/app.js
+2
-2
txLogger.js
src/app/execution/txLogger.js
+4
-4
editor-panel.js
src/app/panels/editor-panel.js
+1
-1
terminal.js
src/app/panels/terminal.js
+2
-0
execution-context.js
src/execution-context.js
+4
-0
typeConversion.js
src/lib/typeConversion.js
+7
-2
No files found.
src/app.js
View file @
08e13f1f
...
...
@@ -536,8 +536,8 @@ function run () {
}
var
transactionDebugger
=
new
Debugger
(
'#debugger'
,
debugAPI
,
editor
.
event
)
transactionDebugger
.
addProvider
(
'vm'
,
executionContext
.
vm
())
transactionDebugger
.
addProvider
(
'injected'
,
executionContext
.
w
eb3
())
transactionDebugger
.
addProvider
(
'web3'
,
executionContext
.
w
eb3
())
transactionDebugger
.
addProvider
(
'injected'
,
executionContext
.
internalW
eb3
())
transactionDebugger
.
addProvider
(
'web3'
,
executionContext
.
internalW
eb3
())
transactionDebugger
.
switchProvider
(
executionContext
.
getProvider
())
var
txLogger
=
new
TxLogger
({
...
...
src/app/execution/txLogger.js
View file @
08e13f1f
...
...
@@ -263,13 +263,13 @@ function context (self, opts) {
var
block
=
data
.
tx
.
blockNumber
||
''
var
i
=
data
.
tx
.
transactionIndex
if
(
executionContext
.
getProvider
()
===
'vm'
)
{
return
yo
`<span><span class=
${
css
.
tx
}
>[vm]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
hexT
oInt
(
val
)}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
return
yo
`<span><span class=
${
css
.
tx
}
>[vm]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
t
oInt
(
val
)}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
hexT
oInt
(
val
)}
wei,
${
logs
}
logs, data:
${
input
}
, hash:
${
hash
}
</span>`
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
t
oInt
(
val
)}
wei,
${
logs
}
logs, data:
${
input
}
, hash:
${
hash
}
</span>`
}
else
{
to
=
helper
.
shortenHexData
(
to
)
hash
=
helper
.
shortenHexData
(
data
.
tx
.
blockHash
)
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
hexT
oInt
(
val
)}
wei</span>`
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
typeConversion
.
t
oInt
(
val
)}
wei</span>`
}
}
...
...
@@ -367,7 +367,7 @@ function createTable (opts) {
`
if
(
opts
.
logs
)
table
.
appendChild
(
logs
)
var
val
=
typeConversion
.
hexT
oInt
(
opts
.
val
)
var
val
=
typeConversion
.
t
oInt
(
opts
.
val
)
val
=
yo
`
<tr class="
${
css
.
tr
}
">
<td class="
${
css
.
td
}
"> value </td>
...
...
src/app/panels/editor-panel.js
View file @
08e13f1f
...
...
@@ -178,7 +178,7 @@ class EditorPanel {
}
}
_adjustLayout
(
direction
,
delta
)
{
var
limitUp
=
36
var
limitUp
=
0
var
limitDown
=
20
var
containerHeight
=
window
.
innerHeight
-
limitUp
// - menu bar containerHeight
var
self
=
this
...
...
src/app/panels/terminal.js
View file @
08e13f1f
...
...
@@ -81,6 +81,8 @@ var css = csjs`
.prompt {
margin-right : 0.5em;
font-family : monospace;
font-weight : bold;
font-size : large;
}
.input {
word-break : break-all;
...
...
src/execution-context.js
View file @
08e13f1f
...
...
@@ -92,6 +92,10 @@ function ExecutionContext () {
return
this
.
isVM
()
?
web3VM
:
web3
}
this
.
internalWeb3
=
function
()
{
return
web3
}
this
.
blankWeb3
=
function
()
{
return
blankWeb3
}
...
...
src/lib/typeConversion.js
View file @
08e13f1f
...
...
@@ -3,8 +3,13 @@ var ethJSUtil = require('ethereumjs-util')
var
BN
=
ethJSUtil
.
BN
module
.
exports
=
{
hexToInt
:
(
h
)
=>
{
return
(
new
BN
(
h
.
replace
(
'0x'
,
''
),
16
)).
toString
(
10
)
toInt
:
(
h
)
=>
{
if
(
h
.
indexOf
&&
h
.
indexOf
(
'0x'
)
===
0
)
{
return
(
new
BN
(
h
.
replace
(
'0x'
,
''
),
16
)).
toString
(
10
)
}
else
if
(
h
.
constructor
&&
h
.
constructor
.
name
===
'BigNumber'
||
BN
.
isBN
(
h
))
{
return
h
.
toString
(
10
)
}
return
h
},
stringify
:
stringify
}
...
...
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