Skip to content

Support LUA 5.5 #86

Description

@kalin-toshev

Thanks for creating this great extension! With the latest update to LUA 5.5, though we hit an issue with a 'const' variable (for loop variable modified inside the loop body). I suggest the following fix (which I also have applied locally on the compiled version (VSCode extension) and it seems to work ok) -

diff --git a/debugger/sourcemap.ts b/debugger/sourcemap.ts
index 96da419..3fbce5f 100644
--- a/debugger/sourcemap.ts
+++ b/debugger/sourcemap.ts
@@ -206,8 +206,7 @@ export namespace SourceMap {
             const scriptRootsStr = os.getenv(scriptRootsEnv);
             if (scriptRootsStr) {
                 for (let [path] of scriptRootsStr.gmatch("[^;]+")) {
-                    path = Path.format(path) + Path.separator;
-                    table.insert(scriptRoots, path);
+                    table.insert(scriptRoots, Path.format(path) + Path.separator);
                 }
             }
         }

Without this, we are getting an error -

...
	....local-lua-debugger-vscode-0.3.3/debugger/lldebugger.lua:331: attempt to assign to const variable 'path'
stack traceback:
	[C]: in ?
...

It would be great if this is fixed, so we won't need to apply fix manually after installing the extension in VSCode.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions