From 7845a95ac43346e2ef62ca99090f33e9499ed321 Mon Sep 17 00:00:00 2001 From: yuki Date: Fri, 7 Nov 2025 22:54:10 -0300 Subject: [PATCH] add debugging --- learns.code-workspace | 34 +++++++++++++++++++++++++++++++++- main.lua | 5 +++++ 2 files changed, 38 insertions(+), 1 deletion(-) 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'