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
75f8b3a3
Commit
75f8b3a3
authored
Oct 04, 2018
by
Iuri Matias
Committed by
yann300
Nov 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor unload; remove all direct references to the internal debugger from the UI
parent
8cd4a356
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
debugger.js
src/app/debugger/debugger/debugger.js
+5
-0
debuggerUI.js
src/app/debugger/debuggerUI.js
+5
-6
No files found.
src/app/debugger/debugger/debugger.js
View file @
75f8b3a3
...
@@ -139,4 +139,9 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
...
@@ -139,4 +139,9 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
this
.
debugger
.
debug
(
tx
)
this
.
debugger
.
debug
(
tx
)
}
}
Debugger
.
prototype
.
unload
=
function
()
{
this
.
debugger
.
unLoad
()
this
.
event
.
trigger
(
'debuggerUnloaded'
)
}
module
.
exports
=
Debugger
module
.
exports
=
Debugger
src/app/debugger/debuggerUI.js
View file @
75f8b3a3
...
@@ -37,7 +37,6 @@ class DebuggerUI {
...
@@ -37,7 +37,6 @@ class DebuggerUI {
compiler
:
this
.
registry
.
get
(
'compiler'
).
api
compiler
:
this
.
registry
.
get
(
'compiler'
).
api
})
})
this
.
debugger
=
this
.
transactionDebugger
.
debugger
this
.
isActive
=
false
this
.
isActive
=
false
this
.
sourceHighlighter
=
new
SourceHighlighter
()
this
.
sourceHighlighter
=
new
SourceHighlighter
()
...
@@ -69,7 +68,7 @@ class DebuggerUI {
...
@@ -69,7 +68,7 @@ class DebuggerUI {
// unload if a file has changed (but not if tabs were switched)
// unload if a file has changed (but not if tabs were switched)
self
.
editor
.
event
.
register
(
'contentChanged'
,
function
()
{
self
.
editor
.
event
.
register
(
'contentChanged'
,
function
()
{
self
.
debugger
.
unL
oad
()
self
.
transactionDebugger
.
unl
oad
()
})
})
}
}
...
@@ -83,6 +82,8 @@ class DebuggerUI {
...
@@ -83,6 +82,8 @@ class DebuggerUI {
this
.
transactionDebugger
.
event
.
register
(
'newSourceLocation'
,
function
(
lineColumnPos
,
rawLocation
)
{
this
.
transactionDebugger
.
event
.
register
(
'newSourceLocation'
,
function
(
lineColumnPos
,
rawLocation
)
{
self
.
sourceHighlighter
.
currentSourceLocation
(
lineColumnPos
,
rawLocation
)
self
.
sourceHighlighter
.
currentSourceLocation
(
lineColumnPos
,
rawLocation
)
})
})
this
.
transactionDebugger
.
event
.
register
(
'debuggerUnloaded'
,
self
.
unLoad
.
bind
(
this
))
}
}
startTxBrowser
()
{
startTxBrowser
()
{
...
@@ -91,14 +92,12 @@ class DebuggerUI {
...
@@ -91,14 +92,12 @@ class DebuggerUI {
this
.
txBrowser
=
txBrowser
this
.
txBrowser
=
txBrowser
txBrowser
.
event
.
register
(
'requestDebug'
,
function
(
blockNumber
,
txNumber
,
tx
)
{
txBrowser
.
event
.
register
(
'requestDebug'
,
function
(
blockNumber
,
txNumber
,
tx
)
{
self
.
debugger
.
unLoad
()
self
.
transactionDebugger
.
unload
()
self
.
unLoad
()
self
.
startDebugging
(
blockNumber
,
txNumber
,
tx
)
self
.
startDebugging
(
blockNumber
,
txNumber
,
tx
)
})
})
txBrowser
.
event
.
register
(
'unloadRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
txBrowser
.
event
.
register
(
'unloadRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
self
.
debugger
.
unLoad
()
self
.
transactionDebugger
.
unload
()
self
.
unLoad
()
})
})
}
}
...
...
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