From ba2743bbade2595cd6760092101367094ac33929 Mon Sep 17 00:00:00 2001 From: fulpm <8397318+fulpm@users.noreply.github.com> Date: Tue, 28 May 2024 18:21:47 +0000 Subject: [PATCH] 20408: Corrected debugger line numbers for non-versioned Amalgam builds (#13) If the Amalgam version is `0.0.0` use 1-based line numbers instead of 0-based. --- package-lock.json | 4 ++-- package.json | 2 +- src/debugger/session.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7749f0f..0e1ffb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "amalgam-lang", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "amalgam-lang", - "version": "1.2.0", + "version": "1.2.1", "license": "AGPL-3.0-only", "dependencies": { "@vscode/debugadapter": "^1.59.0", diff --git a/package.json b/package.json index ee47b4c..8971118 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amalgam-lang", - "version": "1.2.0", + "version": "1.2.1", "type": "commonjs", "publisher": "howso", "displayName": "Amalgam Language", diff --git a/src/debugger/session.ts b/src/debugger/session.ts index c12e57c..5ee3940 100644 --- a/src/debugger/session.ts +++ b/src/debugger/session.ts @@ -503,7 +503,7 @@ export class AmalgamDebugSession extends LoggingDebugSession { try { const executableVersion = await this.getExecutableVersion(executable); outputLogger.info(`Amalgam Version: ${executableVersion}`); - if (semver.lt(executableVersion, "50.0.2")) { + if (semver.gt(executableVersion, "0.0.0") && semver.lt(executableVersion, "50.0.2")) { this.setDebuggerLinesStartAt1(false); this.setDebuggerColumnsStartAt1(false); outputLogger.debug("Line numbers set to 0-based");