فهرست منبع

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) => {