actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
439 stars 95 forks source link

runtimeArgs not passed in #289

Open Frityet opened 5 months ago

Frityet commented 5 months ago

Hello, I am trying to make it so when debugging with LuaJIT the JIT compiler is turned off, along with other optimisations, this is my launch file

{
    "configurations": [
        {
            "arg": [
                "test.tl",
                "-o", "out"
            ],
            "runtimeArgs": "-joff -O0 -jp=a",
            "name": "launch",
            "program": "${workspaceFolder}/src/main.lua",
            "request": "launch",
            "luaVersion": "luajit",
            // "luaexe": "luajit",
            "path": "${workspaceFolder}/?.lua;${workspaceFolder}/?/init.lua;${workspaceFolder}/src/?.lua;${workspaceFolder}/src/?/init.lua;${workspaceFolder}/lua_modules/share/lua/5.1/?.lua;${workspaceFolder}/lua_modules/share/lua/5.1/?/init.lua;",
            "cpath": "${workspaceFolder}/?.so;${workspaceFolder}/lua_modules/lib/lua/5.1/?.so;",
            "stopOnEntry": false,
            "type": "lua",
            "console": "integratedTerminal",
        }
    ]
}

Despite this, this is what I see in the terminal:

 cd /Users/frityet/Documents/teal-compiler ; /Users/frityet/.vscode/extensions/actboy168.lua-debug-2.0.5-darwin-x64/runtime/darwin-x64/luajit/lua -e dofile\"/Users/frityet/.vscode/extensions/actboy168.lua-debug-2.0.5-darwin-x64/script/launch.lua\"\;DBG\"63316\" /Users/frityet/Documents/teal-compiler/src/main.lua test.tl -o out

Doesn't seem to be passing in the args

actboy168 commented 5 months ago

Use arg.

Frityet commented 5 months ago

wont that supply args to my program itself instead of luajit?

Frityet commented 5 months ago

wont that supply args to my program itself instead of luajit?

Confirmed, I want to just be able to turn off the LuaJIT optimisations and JIT because the debugger seems to begin to struggle and I think it will help