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
3101764e
Commit
3101764e
authored
Aug 13, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix fixes for remix-debug integration
parent
de30c58c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
3 deletions
+19
-3
Ethdebugger.js
remix-debug/src/Ethdebugger.js
+7
-3
traceManager.js
remix-lib/src/trace/traceManager.js
+4
-0
traceRetriever.js
remix-lib/src/trace/traceRetriever.js
+2
-0
web3VmProvider.js
remix-lib/src/web3Provider/web3VmProvider.js
+3
-0
compiler.js
remix-solidity/src/compiler/compiler.js
+3
-0
No files found.
remix-debug/src/Ethdebugger.js
View file @
3101764e
...
@@ -36,7 +36,8 @@ function Ethdebugger (opts) {
...
@@ -36,7 +36,8 @@ function Ethdebugger (opts) {
this
.
opts
=
opts
||
{}
this
.
opts
=
opts
||
{}
if
(
!
this
.
opts
.
compilationResult
)
this
.
opts
.
compilationResult
=
()
=>
{
return
null
}
if
(
!
this
.
opts
.
compilationResult
)
this
.
opts
.
compilationResult
=
()
=>
{
return
null
}
this
.
web3
=
opts
.
web3
this
.
executionContext
=
opts
.
executionContext
||
executionContext
;
this
.
web3
=
opts
.
web3
||
this
.
executionContext
.
web3
;
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
...
@@ -55,6 +56,7 @@ function Ethdebugger (opts) {
...
@@ -55,6 +56,7 @@ function Ethdebugger (opts) {
}
}
Ethdebugger
.
prototype
.
setManagers
=
function
()
{
Ethdebugger
.
prototype
.
setManagers
=
function
()
{
console
.
log
(
"remix-debug: setManagers"
);
this
.
traceManager
=
new
TraceManager
({
web3
:
this
.
web3
})
this
.
traceManager
=
new
TraceManager
({
web3
:
this
.
web3
})
this
.
codeManager
=
new
CodeManager
(
this
.
traceManager
)
this
.
codeManager
=
new
CodeManager
(
this
.
traceManager
)
this
.
solidityProxy
=
new
SolidityProxy
(
this
.
traceManager
,
this
.
codeManager
)
this
.
solidityProxy
=
new
SolidityProxy
(
this
.
traceManager
,
this
.
codeManager
)
...
@@ -181,7 +183,7 @@ Ethdebugger.prototype.switchProvider = function (type) {
...
@@ -181,7 +183,7 @@ Ethdebugger.prototype.switchProvider = function (type) {
self
.
web3
=
obj
self
.
web3
=
obj
self
.
setManagers
()
self
.
setManagers
()
// self.traceManager.web3 = self.web3
// self.traceManager.web3 = self.web3
executionContext
.
detectNetwork
((
error
,
network
)
=>
{
self
.
executionContext
.
detectNetwork
((
error
,
network
)
=>
{
if
(
error
||
!
network
)
{
if
(
error
||
!
network
)
{
self
.
web3Debug
=
obj
self
.
web3Debug
=
obj
self
.
web3
=
obj
self
.
web3
=
obj
...
@@ -198,6 +200,7 @@ Ethdebugger.prototype.switchProvider = function (type) {
...
@@ -198,6 +200,7 @@ Ethdebugger.prototype.switchProvider = function (type) {
}
}
Ethdebugger
.
prototype
.
debug
=
function
(
tx
)
{
Ethdebugger
.
prototype
.
debug
=
function
(
tx
)
{
debugger
;
this
.
setCompilationResult
(
this
.
opts
.
compilationResult
())
this
.
setCompilationResult
(
this
.
opts
.
compilationResult
())
if
(
tx
instanceof
Object
)
{
if
(
tx
instanceof
Object
)
{
this
.
txBrowser
.
load
(
tx
.
hash
)
this
.
txBrowser
.
load
(
tx
.
hash
)
...
@@ -209,7 +212,6 @@ Ethdebugger.prototype.debug = function (tx) {
...
@@ -209,7 +212,6 @@ Ethdebugger.prototype.debug = function (tx) {
Ethdebugger
.
prototype
.
unLoad
=
function
()
{
Ethdebugger
.
prototype
.
unLoad
=
function
()
{
this
.
traceManager
.
init
()
this
.
traceManager
.
init
()
this
.
codeManager
.
clear
()
this
.
codeManager
.
clear
()
this
.
stepManager
.
reset
()
this
.
event
.
trigger
(
'traceUnloaded'
)
this
.
event
.
trigger
(
'traceUnloaded'
)
}
}
...
@@ -224,8 +226,10 @@ Ethdebugger.prototype.debug = function (tx) {
...
@@ -224,8 +226,10 @@ Ethdebugger.prototype.debug = function (tx) {
console
.
log
(
'loading trace...'
)
console
.
log
(
'loading trace...'
)
this
.
tx
=
tx
this
.
tx
=
tx
var
self
=
this
var
self
=
this
debugger
;
this
.
traceManager
.
resolveTrace
(
tx
,
function
(
error
,
result
)
{
this
.
traceManager
.
resolveTrace
(
tx
,
function
(
error
,
result
)
{
console
.
log
(
'trace loaded '
+
result
)
console
.
log
(
'trace loaded '
+
result
)
console
.
dir
(
arguments
);
if
(
result
)
{
if
(
result
)
{
self
.
event
.
trigger
(
'newTraceLoaded'
,
[
self
.
traceManager
.
trace
])
self
.
event
.
trigger
(
'newTraceLoaded'
,
[
self
.
traceManager
.
trace
])
if
(
self
.
breakpointManager
&&
self
.
breakpointManager
.
hasBreakpoint
())
{
if
(
self
.
breakpointManager
&&
self
.
breakpointManager
.
hasBreakpoint
())
{
...
...
remix-lib/src/trace/traceManager.js
View file @
3101764e
...
@@ -20,6 +20,8 @@ function TraceManager (options) {
...
@@ -20,6 +20,8 @@ function TraceManager (options) {
// init section
// init section
TraceManager
.
prototype
.
resolveTrace
=
function
(
tx
,
callback
)
{
TraceManager
.
prototype
.
resolveTrace
=
function
(
tx
,
callback
)
{
console
.
dir
(
"resolveTrace: "
);
console
.
dir
(
arguments
);
this
.
tx
=
tx
this
.
tx
=
tx
this
.
init
()
this
.
init
()
if
(
!
this
.
web3
)
callback
(
'web3 not loaded'
,
false
)
if
(
!
this
.
web3
)
callback
(
'web3 not loaded'
,
false
)
...
@@ -68,6 +70,8 @@ TraceManager.prototype.isLoaded = function () {
...
@@ -68,6 +70,8 @@ TraceManager.prototype.isLoaded = function () {
}
}
TraceManager
.
prototype
.
getLength
=
function
(
callback
)
{
TraceManager
.
prototype
.
getLength
=
function
(
callback
)
{
console
.
dir
(
this
.
trace
)
console
.
trace
(
'getLength'
)
if
(
!
this
.
trace
)
{
if
(
!
this
.
trace
)
{
callback
(
'no trace available'
,
null
)
callback
(
'no trace available'
,
null
)
}
else
{
}
else
{
...
...
remix-lib/src/trace/traceRetriever.js
View file @
3101764e
...
@@ -5,6 +5,8 @@ function TraceRetriever (options) {
...
@@ -5,6 +5,8 @@ function TraceRetriever (options) {
}
}
TraceRetriever
.
prototype
.
getTrace
=
function
(
txHash
,
callback
)
{
TraceRetriever
.
prototype
.
getTrace
=
function
(
txHash
,
callback
)
{
console
.
dir
(
"getTrace: "
);
console
.
dir
(
arguments
);
var
options
=
{
var
options
=
{
disableStorage
:
true
,
disableStorage
:
true
,
disableMemory
:
false
,
disableMemory
:
false
,
...
...
remix-lib/src/web3Provider/web3VmProvider.js
View file @
3101764e
...
@@ -198,6 +198,9 @@ web3VmProvider.prototype.getCode = function (address, cb) {
...
@@ -198,6 +198,9 @@ web3VmProvider.prototype.getCode = function (address, cb) {
web3VmProvider
.
prototype
.
setProvider
=
function
(
provider
)
{}
web3VmProvider
.
prototype
.
setProvider
=
function
(
provider
)
{}
web3VmProvider
.
prototype
.
traceTransaction
=
function
(
txHash
,
options
,
cb
)
{
web3VmProvider
.
prototype
.
traceTransaction
=
function
(
txHash
,
options
,
cb
)
{
console
.
dir
(
"traceTransaction: "
);
console
.
dir
(
arguments
);
console
.
trace
(
"here"
);
if
(
this
.
vmTraces
[
txHash
])
{
if
(
this
.
vmTraces
[
txHash
])
{
if
(
cb
)
{
if
(
cb
)
{
cb
(
null
,
this
.
vmTraces
[
txHash
])
cb
(
null
,
this
.
vmTraces
[
txHash
])
...
...
remix-solidity/src/compiler/compiler.js
View file @
3101764e
...
@@ -55,6 +55,7 @@ function Compiler (handleImportCall) {
...
@@ -55,6 +55,7 @@ function Compiler (handleImportCall) {
}
}
var
compile
=
function
(
files
,
target
)
{
var
compile
=
function
(
files
,
target
)
{
console
.
dir
(
"compile"
);
self
.
event
.
trigger
(
'compilationStarted'
,
[])
self
.
event
.
trigger
(
'compilationStarted'
,
[])
internalCompile
(
files
,
target
)
internalCompile
(
files
,
target
)
}
}
...
@@ -210,6 +211,8 @@ function Compiler (handleImportCall) {
...
@@ -210,6 +211,8 @@ function Compiler (handleImportCall) {
self
.
event
.
trigger
(
'compilationFinished'
,
[
false
,
data
,
source
])
self
.
event
.
trigger
(
'compilationFinished'
,
[
false
,
data
,
source
])
}
else
if
(
missingInputs
!==
undefined
&&
missingInputs
.
length
>
0
)
{
}
else
if
(
missingInputs
!==
undefined
&&
missingInputs
.
length
>
0
)
{
// try compiling again with the new set of inputs
// try compiling again with the new set of inputs
console
.
dir
(
"compilationFinshed"
);
internalCompile
(
source
.
sources
,
source
.
target
,
missingInputs
)
internalCompile
(
source
.
sources
,
source
.
target
,
missingInputs
)
}
else
{
}
else
{
data
=
updateInterface
(
data
)
data
=
updateInterface
(
data
)
...
...
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