Skip to content

Commit

Permalink
20408: Corrected debugger line numbers for non-versioned Amalgam buil…
Browse files Browse the repository at this point in the history
…ds (#13)

If the Amalgam version is `0.0.0` use 1-based line numbers instead of
0-based.
  • Loading branch information
fulpm authored May 28, 2024
1 parent df455c6 commit ba2743b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amalgam-lang",
"version": "1.2.0",
"version": "1.2.1",
"type": "commonjs",
"publisher": "howso",
"displayName": "Amalgam Language",
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ba2743b

Please sign in to comment.