소스 검색

Fix breakpoints out of order and confusing VSCode (#217)

Francois Belair 5 년 전
부모
커밋
d3914bceaf
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/debugger/debug_session.ts

+ 2 - 0
src/debugger/debug_session.ts

@@ -302,6 +302,8 @@ export class GodotDebugSession extends LoggingDebugSession {
 			});
 
 			bps = this.debug_data.get_breakpoints(path);
+			// Sort to ensure breakpoints aren't out-of-order, which would confuse VS Code.
+			bps.sort((a, b) => (a.line < b.line ? -1 : 1));
 
 			response.body = {
 				breakpoints: bps.map((bp) => {