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
c90796ba
Unverified
Commit
c90796ba
authored
Mar 26, 2018
by
yann300
Committed by
GitHub
Mar 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #746 from ethereum/yann300-patch-4
Remove use of currentStepIndex
parents
dcbb37f5
a7fb57d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
breakpointManager.js
remix-core/src/code/breakpointManager.js
+10
-9
No files found.
remix-core/src/code/breakpointManager.js
View file @
c90796ba
...
...
@@ -28,8 +28,8 @@ class BreakpointManager {
* @param {Bool} defaultToLimit - if true jump to the end of the trace if no more breakpoint found
*
*/
async
jumpNextBreakpoint
(
defaultToLimit
)
{
this
.
jump
(
1
,
defaultToLimit
)
async
jumpNextBreakpoint
(
fromStep
,
defaultToLimit
)
{
this
.
jump
(
fromStep
||
0
,
1
,
defaultToLimit
)
}
/**
...
...
@@ -37,8 +37,8 @@ class BreakpointManager {
* @param {Bool} defaultToLimit - if true jump to the start of the trace if no more breakpoint found
*
*/
async
jumpPreviousBreakpoint
(
defaultToLimit
)
{
this
.
jump
(
-
1
,
defaultToLimit
)
async
jumpPreviousBreakpoint
(
fromStep
,
defaultToLimit
)
{
this
.
jump
(
fromStep
||
0
,
-
1
,
defaultToLimit
)
}
/**
...
...
@@ -47,7 +47,7 @@ class BreakpointManager {
* @param {Bool} defaultToLimit - if true jump to the limit (end if direction is 1, beginning if direction is -1) of the trace if no more breakpoint found
*
*/
async
jump
(
direction
,
defaultToLimit
)
{
async
jump
(
fromStep
,
direction
,
defaultToLimit
)
{
if
(
!
this
.
locationToRowConverter
)
{
console
.
log
(
'row converter not provided'
)
return
...
...
@@ -67,15 +67,15 @@ class BreakpointManager {
sourceLocation
.
start
+
sourceLocation
.
length
>=
previousSourceLocation
.
start
+
previousSourceLocation
.
length
))
{
return
false
}
else
{
self
.
debugger
.
stepManager
.
jumpTo
(
currentStep
)
self
.
event
.
trigger
(
'breakpointHit'
,
[
sourceLocation
])
if
(
self
.
debugger
.
stepManager
)
self
.
debugger
.
stepManager
.
jumpTo
(
currentStep
)
self
.
event
.
trigger
(
'breakpointHit'
,
[
sourceLocation
,
currentStep
])
return
true
}
}
var
sourceLocation
var
previousSourceLocation
var
currentStep
=
this
.
debugger
.
currentStepIndex
+
direction
var
currentStep
=
fromStep
+
direction
var
lineHadBreakpoint
=
false
while
(
currentStep
>
0
&&
currentStep
<
this
.
debugger
.
traceManager
.
trace
.
length
)
{
try
{
...
...
@@ -105,7 +105,8 @@ class BreakpointManager {
}
currentStep
+=
direction
}
if
(
defaultToLimit
)
{
this
.
event
.
trigger
(
'NoBreakpointHit'
,
[])
if
(
this
.
debugger
.
stepManager
&&
defaultToLimit
)
{
if
(
direction
===
-
1
)
{
this
.
debugger
.
stepManager
.
jumpTo
(
0
)
}
else
if
(
direction
===
1
)
{
...
...
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