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
d2d88ce8
Commit
d2d88ce8
authored
Feb 22, 2017
by
yann300
Committed by
GitHub
Feb 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #411 from ethereum/breakpointremix
Breakpoints
parents
48918507
053304ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
1 deletion
+50
-1
browser-solidity.css
assets/css/browser-solidity.css
+4
-0
debugger.js
src/app/debugger.js
+20
-0
editor.js
src/app/editor.js
+25
-0
contracts.js
test-browser/helpers/contracts.js
+1
-1
No files found.
assets/css/browser-solidity.css
View file @
d2d88ce8
...
@@ -487,3 +487,7 @@ input[type="file"] {
...
@@ -487,3 +487,7 @@ input[type="file"] {
background-color
:
#F4B9B7
;
background-color
:
#F4B9B7
;
opacity
:
0.5
;
opacity
:
0.5
;
}
}
.ace_gutter-cell.ace_breakpoint
{
background-color
:
#F77E79
;
}
src/app/debugger.js
View file @
d2d88ce8
...
@@ -12,7 +12,27 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) {
...
@@ -12,7 +12,27 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) {
this
.
el
.
appendChild
(
this
.
debugger
.
render
())
this
.
el
.
appendChild
(
this
.
debugger
.
render
())
this
.
appAPI
=
appAPI
this
.
appAPI
=
appAPI
this
.
breakPointManager
=
new
remix
.
code
.
BreakpointManager
(
this
.
debugger
,
(
sourceLocation
)
=>
{
return
appAPI
.
offsetToLineColumn
(
sourceLocation
,
sourceLocation
.
file
,
this
.
editor
,
this
.
appAPI
.
lastCompilationResult
().
data
)
})
this
.
debugger
.
setBreakpointManager
(
this
.
breakPointManager
)
this
.
breakPointManager
.
event
.
register
(
'breakpointHit'
,
(
sourceLocation
)
=>
{
})
var
self
=
this
var
self
=
this
editorEvent
.
register
(
'breakpointCleared'
,
(
fileName
,
row
)
=>
{
if
(
self
.
appAPI
.
lastCompilationResult
().
data
)
{
this
.
breakPointManager
.
remove
({
fileName
:
fileName
,
row
:
row
})
}
})
editorEvent
.
register
(
'breakpointAdded'
,
(
fileName
,
row
)
=>
{
if
(
self
.
appAPI
.
lastCompilationResult
().
data
)
{
this
.
breakPointManager
.
add
({
fileName
:
fileName
,
row
:
row
})
}
})
executionContextEvent
.
register
(
'contextChanged'
,
this
,
function
(
context
)
{
executionContextEvent
.
register
(
'contextChanged'
,
this
,
function
(
context
)
{
self
.
switchProvider
(
context
)
self
.
switchProvider
(
context
)
})
})
...
...
src/app/editor.js
View file @
d2d88ce8
...
@@ -18,6 +18,31 @@ function Editor () {
...
@@ -18,6 +18,31 @@ function Editor () {
var
emptySession
=
createSession
(
''
)
var
emptySession
=
createSession
(
''
)
var
self
=
this
editor
.
on
(
'guttermousedown'
,
function
(
e
)
{
var
target
=
e
.
domEvent
.
target
if
(
target
.
className
.
indexOf
(
'ace_gutter-cell'
)
===
-
1
)
{
return
}
var
row
=
e
.
getDocumentPosition
().
row
var
breakpoints
=
e
.
editor
.
session
.
getBreakpoints
()
for
(
var
k
in
breakpoints
)
{
if
(
k
===
row
.
toString
())
{
event
.
trigger
(
'breakpointCleared'
,
[
currentSession
,
row
])
e
.
editor
.
session
.
clearBreakpoint
(
row
)
e
.
stop
()
return
}
}
self
.
setBreakpoint
(
row
)
event
.
trigger
(
'breakpointAdded'
,
[
currentSession
,
row
])
e
.
stop
()
})
this
.
setBreakpoint
=
function
(
row
,
css
)
{
editor
.
session
.
setBreakpoint
(
row
,
css
)
}
function
createSession
(
content
)
{
function
createSession
(
content
)
{
var
s
=
new
ace
.
EditSession
(
content
,
'ace/mode/javascript'
)
var
s
=
new
ace
.
EditSession
(
content
,
'ace/mode/javascript'
)
s
.
setUndoManager
(
new
ace
.
UndoManager
())
s
.
setUndoManager
(
new
ace
.
UndoManager
())
...
...
test-browser/helpers/contracts.js
View file @
d2d88ce8
...
@@ -21,7 +21,7 @@ function testContracts (browser, contractCode, compiledContractNames, callback)
...
@@ -21,7 +21,7 @@ function testContracts (browser, contractCode, compiledContractNames, callback)
.
clearValue
(
'#input textarea'
)
.
clearValue
(
'#input textarea'
)
.
click
(
'.newFile'
)
.
click
(
'.newFile'
)
.
setValue
(
'#input textarea'
,
contractCode
,
function
()
{})
.
setValue
(
'#input textarea'
,
contractCode
,
function
()
{})
.
waitForElementPresent
(
'.contract .create'
,
2
000
,
true
,
function
()
{
.
waitForElementPresent
(
'.contract .create'
,
5
000
,
true
,
function
()
{
checkCompiledContracts
(
browser
,
compiledContractNames
,
callback
)
checkCompiledContracts
(
browser
,
compiledContractNames
,
callback
)
})
})
}
}
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