Skip to content

LuaJIT debugging fails to map line information, possibly due to assignment to iter variable #354

Closed

Description

@vaisest

I've encountered a problem (originally in PathOfBuilding) where breakpoints display "The source file has no line information." and refuse to work. It seems that this is caused by some sort of Lua 5.5 vs LuaJIT implementation difference, where the former doesn't allow assignment to variables in for-loops.

For example, the following example seems to break the debugger:

local chars = {}

local s = "hello world"

for c in s:gmatch(".") do
    c = "test"..c
    table.insert(chars, c)
end

print("break")

return s

This is WITH "luaVersion": "luajit",. Running this and attaching a debugger seems to reliably result in a grayed out breakpoint which doesn't work.

Would it be possible to fully support LuaJIT so that something like this does not happen?

Activity

  1. vaisest commented on Jun 15, 2026

    @vaisest
    Author

    I've been using the extension for a while now with some lines commented out in trackerFactory.js:

    // m.arguments.sourceContent = doc.getText(); and m.arguments.sourceContent = fs.readFileSync(m.arguments.source.path, 'utf8');.

    Not sure how relevant this is, but I haven't had any issues. It seems like this extension functions perfectly fine otherwise, so it would be nice if the issue was fixed.

  2. added a commit that references this issue on Jun 24, 2026
    7bcc73f
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