actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
435 stars 94 forks source link

Luarocks support? #192

Closed Frityet closed 1 year ago

Frityet commented 2 years ago

How could I make the plugin work with a project I created with luarocks init?

Here is my launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lua",
            "request": "launch",
            "name": "Debug",
            "program": "${workspaceFolder}/tests/main.lua",
            "luaexe": "${workspaceFolder}/lua",
            "luaVersion": "jit",
        }
    ]
}
actboy168 commented 2 years ago

I don't know about luarocks.

Maybe you can remove "luaexe": "${workspaceFolder}/lua".

Frityet commented 2 years ago

Luarocks has a shell script in ${workspaceFolder}/lua

Nilegfx commented 1 year ago

I am also interested to achieve the same as @Frityet . any idea how can we incorporate luarocks with this nice debugging extension?

Frityet commented 1 year ago

I am also interested to achieve the same as @Frityet . any idea how can we incorporate luarocks with this nice debugging extension?

Alright so with enough elbow grease I was able to get it to work, basically you need to run luarocks make before trying to execute the file which should be in the lua_modules dir (look in the subdirs). Make sure you setup the launch settings to make the LuaRocks loader run on launch. You will have to adjust path and c path to make it work. I will write a proper tutorial later!

Frityet commented 1 year ago

@Nilegfx https://github.com/actboy168/lua-debug/issues/202