Skip to content

Commit

Permalink
fixes #50812
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed May 31, 2018
1 parent e11fa76 commit f401bbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/workbench/parts/debug/browser/debugEditorActions.ts
Expand Up @@ -227,15 +227,15 @@ class GoToBreakpointAction extends EditorAction {
//Try to find breakpoint in current file
let moveBreakpoint =
this.isNext
? allEnabledBreakpoints.filter(bp => bp.uri.toString() === currentUri.toString() && bp.lineNumber > currentLine)[0]
: allEnabledBreakpoints.filter(bp => bp.uri.toString() === currentUri.toString() && bp.lineNumber < currentLine)[0];
? allEnabledBreakpoints.filter(bp => bp.uri.toString() === currentUri.toString() && bp.lineNumber > currentLine).shift()
: allEnabledBreakpoints.filter(bp => bp.uri.toString() === currentUri.toString() && bp.lineNumber < currentLine).pop();

//Try to find breakpoints in following files
if (!moveBreakpoint) {
moveBreakpoint =
this.isNext
? allEnabledBreakpoints.filter(bp => bp.uri.toString() > currentUri.toString())[0]
: allEnabledBreakpoints.filter(bp => bp.uri.toString() < currentUri.toString())[0];
? allEnabledBreakpoints.filter(bp => bp.uri.toString() > currentUri.toString()).shift()
: allEnabledBreakpoints.filter(bp => bp.uri.toString() < currentUri.toString()).pop();
}

//Move to first possible breakpoint
Expand Down

0 comments on commit f401bbc

Please sign in to comment.