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
d077a047
Commit
d077a047
authored
Dec 11, 2020
by
aniket-engg
Committed by
Aniket
Dec 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger ans solidityLocals updated
parent
f57be84d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
18 deletions
+33
-18
debugger.ts
libs/remix-debug/src/debugger/debugger.ts
+22
-13
solidityLocals.ts
libs/remix-debug/src/debugger/solidityLocals.ts
+11
-5
No files found.
libs/remix-debug/src/debugger/debugger.ts
View file @
d077a047
...
@@ -7,7 +7,17 @@ const BreakpointManager = require('../code/breakpointManager')
...
@@ -7,7 +7,17 @@ const BreakpointManager = require('../code/breakpointManager')
const
StepManager
=
require
(
'./stepManager'
)
const
StepManager
=
require
(
'./stepManager'
)
const
VmDebuggerLogic
=
require
(
'./VmDebugger'
)
const
VmDebuggerLogic
=
require
(
'./VmDebugger'
)
function
Debugger
(
options
)
{
export
class
Debugger
{
event
offsetToLineColumnConverter
compilationResult
debugger
breakPointManager
step_manager
vmDebuggerLogic
constructor
(
options
)
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
offsetToLineColumnConverter
=
options
.
offsetToLineColumnConverter
this
.
offsetToLineColumnConverter
=
options
.
offsetToLineColumnConverter
...
@@ -47,9 +57,9 @@ function Debugger (options) {
...
@@ -47,9 +57,9 @@ function Debugger (options) {
this
.
debugger
.
event
.
register
(
'traceUnloaded'
,
this
,
()
=>
{
this
.
debugger
.
event
.
register
(
'traceUnloaded'
,
this
,
()
=>
{
this
.
event
.
trigger
(
'debuggerStatus'
,
[
false
])
this
.
event
.
trigger
(
'debuggerStatus'
,
[
false
])
})
})
}
}
Debugger
.
prototype
.
registerAndHighlightCodeItem
=
async
function
(
index
)
{
async
registerAndHighlightCodeItem
(
index
)
{
// register selected code item, highlight the corresponding source location
// register selected code item, highlight the corresponding source location
// this.debugger.traceManager.getCurrentCalledAddressAt(index, async (error, address) => {
// this.debugger.traceManager.getCurrentCalledAddressAt(index, async (error, address) => {
...
@@ -81,13 +91,13 @@ Debugger.prototype.registerAndHighlightCodeItem = async function (index) {
...
@@ -81,13 +91,13 @@ Debugger.prototype.registerAndHighlightCodeItem = async function (index) {
}
catch
(
error
)
{
}
catch
(
error
)
{
return
console
.
log
(
error
)
return
console
.
log
(
error
)
}
}
}
}
Debugger
.
prototype
.
updateWeb3
=
function
(
web3
)
{
updateWeb3
(
web3
)
{
this
.
debugger
.
web3
=
web3
this
.
debugger
.
web3
=
web3
}
}
Debugger
.
prototype
.
debug
=
function
(
blockNumber
,
txNumber
,
tx
,
loadingCb
)
{
debug
(
blockNumber
,
txNumber
,
tx
,
loadingCb
)
{
const
web3
=
this
.
debugger
.
web3
const
web3
=
this
.
debugger
.
web3
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -122,9 +132,9 @@ Debugger.prototype.debug = function (blockNumber, txNumber, tx, loadingCb) {
...
@@ -122,9 +132,9 @@ Debugger.prototype.debug = function (blockNumber, txNumber, tx, loadingCb) {
return
reject
(
e
.
message
)
return
reject
(
e
.
message
)
}
}
})
})
}
}
Debugger
.
prototype
.
debugTx
=
function
(
tx
,
loadingCb
)
{
debugTx
(
tx
,
loadingCb
)
{
this
.
step_manager
=
new
StepManager
(
this
.
debugger
,
this
.
debugger
.
traceManager
)
this
.
step_manager
=
new
StepManager
(
this
.
debugger
,
this
.
debugger
.
traceManager
)
this
.
debugger
.
codeManager
.
event
.
register
(
'changed'
,
this
,
(
code
,
address
,
instIndex
)
=>
{
this
.
debugger
.
codeManager
.
event
.
register
(
'changed'
,
this
,
(
code
,
address
,
instIndex
)
=>
{
...
@@ -150,11 +160,10 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
...
@@ -150,11 +160,10 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
loadingCb
()
loadingCb
()
this
.
debugger
.
debug
(
tx
)
this
.
debugger
.
debug
(
tx
)
}
}
Debugger
.
prototype
.
unload
=
function
()
{
unload
()
{
this
.
debugger
.
unLoad
()
this
.
debugger
.
unLoad
()
this
.
event
.
trigger
(
'debuggerUnloaded'
)
this
.
event
.
trigger
(
'debuggerUnloaded'
)
}
}
}
module
.
exports
=
Debugger
libs/remix-debug/src/debugger/solidityLocals.ts
View file @
d077a047
const
EventManager
=
require
(
'../eventManager'
)
const
EventManager
=
require
(
'../eventManager'
)
const
localDecoder
=
require
(
'../solidity-decoder/localDecoder'
)
const
localDecoder
=
require
(
'../solidity-decoder/localDecoder'
)
const
StorageViewer
=
require
(
'../storage/storageViewer'
)
const
StorageViewer
=
require
(
'../storage/storageViewer'
)
class
DebuggerSolidityLocals
{
export
class
DebuggerSolidityLocals
{
event
stepManager
internalTreeCall
storageResolver
traceManager
tx
_sourceLocation
constructor
(
tx
,
_stepManager
,
_traceManager
,
_internalTreeCall
)
{
constructor
(
tx
,
_stepManager
,
_traceManager
,
_internalTreeCall
)
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
stepManager
=
_stepManager
this
.
stepManager
=
_stepManager
...
@@ -28,7 +36,7 @@ class DebuggerSolidityLocals {
...
@@ -28,7 +36,7 @@ class DebuggerSolidityLocals {
},
500
)
},
500
)
}
}
decode
(
sourceLocation
,
cursor
)
{
decode
(
sourceLocation
,
cursor
?
)
{
const
self
=
this
const
self
=
this
this
.
event
.
trigger
(
'solidityLocalsMessage'
,
[
''
])
this
.
event
.
trigger
(
'solidityLocalsMessage'
,
[
''
])
this
.
traceManager
.
waterfall
([
this
.
traceManager
.
waterfall
([
...
@@ -94,5 +102,3 @@ class DebuggerSolidityLocals {
...
@@ -94,5 +102,3 @@ class DebuggerSolidityLocals {
},
500
)
},
500
)
}
}
}
}
module
.
exports
=
DebuggerSolidityLocals
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