diff --git a/learns.code-workspace b/learns.code-workspace index 876a149..d5b3c3d 100644 --- a/learns.code-workspace +++ b/learns.code-workspace @@ -4,5 +4,37 @@ "path": "." } ], - "settings": {} + "settings": {}, + "launch": { + "version": "0.2.0", + "configurations": [ + { + "type": "lua-local", + "request": "launch", + "name": "Debug Love", + "program": { + "command": "/usr/bin/love" + }, + "args": [ "${workspaceFolder} "] + }, + { + "name": "Debug Lua Interpreter", + "type": "lua-local", + "request": "launch", + "program": { + "lua": "lua", + "file": "${file}" + } + }, + { + "name": "Debug Custom Lua Environment", + "type": "lua-local", + "request": "launch", + "program": { + "command": "command" + }, + "args": [] + } + ] + } } \ No newline at end of file diff --git a/main.lua b/main.lua index c9acb4f..65070b2 100644 --- a/main.lua +++ b/main.lua @@ -1,3 +1,8 @@ +-- debug -- +if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then + require("lldebugger").start() +end + -- libraries -- Object = require 'lib/classic/classic'