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
6fc83760
Commit
6fc83760
authored
Oct 13, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fetched locals
parent
724761d2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
11 deletions
+19
-11
VmDebugger.js
.../remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js
+3
-0
SolidityLocals.js
...app/tabs/debugger/debuggerUI/vmDebugger/SolidityLocals.js
+11
-6
SolidityTypeFormatter.js
...gger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter.js
+0
-1
VmDebugger.js
libs/remix-debug/src/debugger/VmDebugger.js
+3
-0
solidityLocals.js
libs/remix-debug/src/debugger/solidityLocals.js
+2
-4
No files found.
apps/remix-ide/src/app/tabs/debugger/debuggerUI/VmDebugger.js
View file @
6fc83760
...
...
@@ -83,6 +83,9 @@ function VmDebugger (vmDebuggerLogic) {
this
.
vmDebuggerLogic
.
event
.
register
(
'solidityStateUpdating'
,
this
.
solidityState
.
setUpdating
.
bind
(
this
.
solidityState
))
this
.
solidityLocals
=
new
SolidityLocals
(
vmDebuggerLogic
)
this
.
solidityLocals
.
event
.
register
(
'solidityLocalsLoadMore'
,
(
cursor
)
=>
{
this
.
vmDebuggerLogic
.
event
.
trigger
(
'solidityLocalsLoadMore'
,
[
cursor
])
})
this
.
vmDebuggerLogic
.
event
.
register
(
'solidityLocals'
,
this
.
solidityLocals
.
update
.
bind
(
this
.
solidityLocals
))
this
.
vmDebuggerLogic
.
event
.
register
(
'solidityLocalsMessage'
,
this
.
solidityLocals
.
setMessage
.
bind
(
this
.
solidityLocals
))
this
.
vmDebuggerLogic
.
event
.
register
(
'solidityLocalsUpdating'
,
this
.
solidityLocals
.
setUpdating
.
bind
(
this
.
solidityLocals
))
...
...
apps/remix-ide/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityLocals.js
View file @
6fc83760
...
...
@@ -3,18 +3,18 @@ var EventManager = require('../../../../../lib/events')
var
DropdownPanel
=
require
(
'./DropdownPanel'
)
var
solidityTypeFormatter
=
require
(
'./utils/SolidityTypeFormatter'
)
var
yo
=
require
(
'yo-yo'
)
var
deepequal
=
require
(
'deep-equal'
)
class
SolidityLocals
{
constructor
(
vmDebuggerLogic
)
{
constructor
()
{
this
.
event
=
new
EventManager
()
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity Locals'
,
{
json
:
true
,
formatSelf
:
solidityTypeFormatter
.
formatSelf
,
extractData
:
solidityTypeFormatter
.
extractData
,
loadMore
:
(
cursor
)
=>
{
console
.
log
(
'cursor: '
,
cursor
)
vmDebuggerLogic
.
event
.
trigger
(
'solidityLocalsLoadMore'
,
[
cursor
])
this
.
event
.
trigger
(
'solidityLocalsLoadMore'
,
[
cursor
])
}
})
this
.
view
...
...
@@ -41,9 +41,14 @@ class SolidityLocals {
}
mergeLocals
(
locals1
,
locals2
)
{
console
.
log
(
'locals1: '
,
locals1
)
console
.
log
(
'locals2: '
,
locals2
)
return
{}
Object
.
keys
(
locals2
).
map
(
item
=>
{
if
(
!
deepequal
(
locals2
[
item
],
locals1
[
item
]))
{
if
(
locals2
[
item
].
cursor
)
{
locals2
[
item
].
value
=
[...
locals2
[
item
].
value
,
...
locals1
[
item
].
value
]
}
}
})
return
locals2
}
render
()
{
...
...
apps/remix-ide/src/app/tabs/debugger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter.js
View file @
6fc83760
...
...
@@ -53,7 +53,6 @@ function extractData (item, parent, key) {
ret
.
self
=
item
.
value
ret
.
type
=
item
.
type
}
if
(
ret
.
hasNext
)
console
.
log
(
'return value: '
,
ret
)
return
ret
}
...
...
libs/remix-debug/src/debugger/VmDebugger.js
View file @
6fc83760
...
...
@@ -229,6 +229,9 @@ class VmDebuggerLogic {
listenToSolidityLocalsEvents
()
{
this
.
event
.
register
(
'sourceLocationChanged'
,
this
.
debuggerSolidityLocals
.
init
.
bind
(
this
.
debuggerSolidityLocals
))
this
.
event
.
register
(
'solidityLocalsLoadMore'
,
this
.
debuggerSolidityLocals
.
decodeMore
.
bind
(
this
.
debuggerSolidityLocals
))
this
.
debuggerSolidityLocals
.
event
.
register
(
'solidityLocalsLoadMoreCompleted'
,
(
locals
)
=>
{
this
.
event
.
trigger
(
'solidityLocalsLoadMoreCompleted'
,
[
locals
])
})
this
.
debuggerSolidityLocals
.
event
.
register
(
'solidityLocals'
,
(
state
)
=>
{
this
.
event
.
trigger
(
'solidityLocals'
,
[
state
])
})
...
...
libs/remix-debug/src/debugger/solidityLocals.js
View file @
6fc83760
...
...
@@ -86,14 +86,12 @@ class DebuggerSolidityLocals {
})
}
decodeMore
()
{
console
.
log
(
'called and works!'
)
decodeMore
(
cursor
)
{
let
decodeTimeout
=
null
if
(
!
this
.
storageResolver
)
return
this
.
event
.
trigger
(
'solidityLocalsMessage'
,
[
'storage not ready'
])
if
(
decodeTimeout
)
window
.
clearTimeout
(
decodeTimeout
)
this
.
event
.
trigger
(
'solidityLocalsUpdating'
)
decodeTimeout
=
setTimeout
(()
=>
{
this
.
decode
(
this
.
_sourceLocation
)
this
.
decode
(
this
.
_sourceLocation
,
cursor
)
},
500
)
}
...
...
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