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
211ed05d
Commit
211ed05d
authored
Dec 20, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix debugger
parent
4f386daa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
debuggerUI.js
src/app/debugger/debuggerUI.js
+22
-16
No files found.
src/app/debugger/debuggerUI.js
View file @
211ed05d
...
...
@@ -90,19 +90,10 @@ class DebuggerUI {
this
.
contextManager
=
new
ContextManager
()
// TODO debugging with source highlight is disabled. see line 98
this
.
debugger
=
new
Debugger
({
web3
:
this
.
contextManager
.
getWeb3
(),
offsetToLineColumnConverter
:
this
.
registry
.
get
(
'offsettolinecolumnconverter'
).
api
,
compiler
:
{
lastCompilationResult
:
null
}
})
this
.
contextManager
.
initProviders
()
this
.
contextManager
.
event
.
register
(
'providerChanged'
,
()
=>
{
this
.
debugger
.
updateWeb3
(
this
.
contextManager
.
getWeb3
())
if
(
this
.
debugger
)
this
.
debugger
.
updateWeb3
(
this
.
contextManager
.
getWeb3
())
})
this
.
isActive
=
false
...
...
@@ -119,7 +110,6 @@ class DebuggerUI {
container
.
appendChild
(
this
.
render
())
this
.
setEditor
()
this
.
listenToEvents
()
}
setEditor
()
{
...
...
@@ -127,20 +117,22 @@ class DebuggerUI {
this
.
editor
=
this
.
registry
.
get
(
'editor'
).
api
self
.
editor
.
event
.
register
(
'breakpointCleared'
,
(
fileName
,
row
)
=>
{
self
.
debugger
.
breakPointManager
.
remove
({
fileName
:
fileName
,
row
:
row
})
if
(
self
.
debugger
)
self
.
debugger
.
breakPointManager
.
remove
({
fileName
:
fileName
,
row
:
row
})
})
self
.
editor
.
event
.
register
(
'breakpointAdded'
,
(
fileName
,
row
)
=>
{
self
.
debugger
.
breakPointManager
.
add
({
fileName
:
fileName
,
row
:
row
})
if
(
self
.
debugger
)
self
.
debugger
.
breakPointManager
.
add
({
fileName
:
fileName
,
row
:
row
})
})
self
.
editor
.
event
.
register
(
'contentChanged'
,
function
()
{
self
.
debugger
.
unload
()
if
(
self
.
debugger
)
self
.
debugger
.
unload
()
})
}
listenToEvents
()
{
const
self
=
this
if
(
!
self
.
debugger
)
return
this
.
debugger
.
event
.
register
(
'debuggerStatus'
,
function
(
isActive
)
{
self
.
sourceHighlighter
.
currentSourceLocation
(
null
)
self
.
isActive
=
isActive
...
...
@@ -159,12 +151,12 @@ class DebuggerUI {
this
.
txBrowser
=
txBrowser
txBrowser
.
event
.
register
(
'requestDebug'
,
function
(
blockNumber
,
txNumber
,
tx
)
{
self
.
debugger
.
unload
()
if
(
self
.
debugger
)
self
.
debugger
.
unload
()
self
.
startDebugging
(
blockNumber
,
txNumber
,
tx
)
})
txBrowser
.
event
.
register
(
'unloadRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
self
.
debugger
.
unload
()
if
(
self
.
debugger
)
self
.
debugger
.
unload
()
})
}
...
...
@@ -174,6 +166,20 @@ class DebuggerUI {
startDebugging
(
blockNumber
,
txNumber
,
tx
)
{
const
self
=
this
if
(
this
.
debugger
)
delete
this
.
debugger
let
compilers
=
this
.
registry
.
get
(
'compilersartefacts'
).
api
let
lastCompilationResult
if
(
compilers
[
'__last'
])
lastCompilationResult
=
compilers
[
'__last'
]
// TODO debugging with source highlight is disabled. see line 98
this
.
debugger
=
new
Debugger
({
web3
:
this
.
contextManager
.
getWeb3
(),
offsetToLineColumnConverter
:
this
.
registry
.
get
(
'offsettolinecolumnconverter'
).
api
,
compiler
:
{
lastCompilationResult
}
})
this
.
listenToEvents
()
this
.
debugger
.
debugger
.
updateWeb3
(
this
.
executionContext
.
web3
())
this
.
debugger
.
debug
(
blockNumber
,
txNumber
,
tx
,
()
=>
{
...
...
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