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
9b557f0c
Commit
9b557f0c
authored
Oct 16, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display errors
parent
5d5fcae4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
rdb.js
remix-debug/rdb.js
+11
-6
index.js
remix-debug/src/cmdline/index.js
+2
-0
solidityState.js
remix-debug/src/debugger/solidityState.js
+6
-0
No files found.
remix-debug/rdb.js
View file @
9b557f0c
...
...
@@ -6,6 +6,7 @@ var fs = require('fs')
//var filename = 'test/sol/ballot.sol'
var
filename
=
'test/sol/simple_storage.sol'
var
short_filename
=
"simple_storage.sol"
//var filename = 'browser/ballot.sol'
var
input_json
=
{
...
...
@@ -27,7 +28,7 @@ var input_json = {
}
}
input_json
.
sources
[
filename
]
=
{
content
:
fs
.
readFileSync
(
filename
).
toString
()}
input_json
.
sources
[
short_
filename
]
=
{
content
:
fs
.
readFileSync
(
filename
).
toString
()}
console
.
dir
(
input_json
)
...
...
@@ -53,7 +54,7 @@ var deployContract = function (cb) {
let
txNumber
=
null
let
tx
=
null
let
code
=
compilation
.
data
.
contracts
[
filename
].
SimpleStorage
.
evm
.
bytecode
.
object
let
code
=
compilation
.
data
.
contracts
[
short_
filename
].
SimpleStorage
.
evm
.
bytecode
.
object
console
.
dir
(
"deploying..."
)
console
.
dir
(
code
)
_web3
.
eth
.
sendTransaction
({
data
:
"0x"
+
code
,
from
:
_web3
.
eth
.
accounts
[
0
],
gas
:
800000
},
cb
)
...
...
@@ -65,14 +66,18 @@ let _web3 = cmd_line.debugger.debugger.web3
// var tx = "0x04aa74287b3c52e2ecab1cb066d22116317155503681870c516c95cdb148fa28"
// var tx = "0x04aa74287b3c52e2ecab1cb066d22116317155503681870c516c95cdb148fa28"
// var tx = "0x28bd66d99bc45b3f8d959126a26b8c97092892e63fc8ed90eb1598ebedf600ef"
// var tx = "0x3a7355c59f95db494872f33890dbabaceae1ca5330db86db49d24a5c29cd829
a"
var
tx
=
"0xf510c4f0b1d9ee262d7b9e9e87b4262f275fe029c2c733feef7dfa1e2b1e32a
a"
// _web3.eth.getTransactionReceipt(tx, (err, data) => {
// console.dir(err)
// console.dir(data)
deployContract
((
err
,
tx
)
=>
{
cmd_line
.
startDebug
(
tx
,
filename
)
})
// deployContract((err, tx) => {
cmd_line
.
startDebug
(
tx
,
short_filename
)
cmd_line
.
events
.
on
(
"source"
,
()
=>
{
cmd_line
.
getSource
().
forEach
(
console
.
dir
)
})
// })
//})
const
repl
=
require
(
'repl'
)
...
...
remix-debug/src/cmdline/index.js
View file @
9b557f0c
...
...
@@ -102,10 +102,12 @@ class CmdLine {
}
displayLocals
()
{
console
.
dir
(
"= displayLocals"
)
console
.
dir
(
this
.
solidityLocals
)
}
displayGlobals
()
{
console
.
dir
(
"= displayGlobals"
)
console
.
dir
(
this
.
solidityState
)
if
(
this
.
solidityState
&&
this
.
solidityState
.
voters
)
{
console
.
dir
(
this
.
solidityState
.
voters
)
...
...
remix-debug/src/debugger/solidityState.js
View file @
9b557f0c
...
...
@@ -40,6 +40,8 @@ class DebuggerSolidityState {
try
{
self
.
decode
(
index
)
}
catch
(
err
)
{
console
.
dir
(
"====> error"
)
console
.
dir
(
err
)
}
},
500
)
...
...
@@ -51,7 +53,11 @@ class DebuggerSolidityState {
decode
(
index
)
{
const
self
=
this
console
.
dir
(
"currentStepIndex"
)
console
.
dir
(
self
.
stepManager
.
currentStepIndex
)
self
.
traceManager
.
getCurrentCalledAddressAt
(
self
.
stepManager
.
currentStepIndex
,
function
(
error
,
address
)
{
console
.
dir
(
error
)
console
.
dir
(
address
)
if
(
error
)
{
return
self
.
event
.
trigger
(
'solidityState'
,
[{}])
}
...
...
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