Skip to content

Commit

Permalink
support Second Local Lua Debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
bb010g committed Jan 13, 2025
1 parent c90674b commit c9153be
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.pre-commit-config.yaml
/deps/
/luaunit.lua
/.vscode/
/.vscode/*
!/.vscode/launch.json
/target/
Cargo.lock
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lua-local",
"request": "launch",
"name": "Debug (LuaJIT): runtest.lua",
"program": {
"command": "luajit"
},
"verbose": true,
"args": [
"runtest.lua"
]
},
{
"type": "lua-local",
"request": "launch",
"name": "Debug (Luvit): runtest.lua",
"program": {
"command": "luvit"
},
"verbose": true,
"args": [
"runtest.lua"
]
}
]
}
6 changes: 5 additions & 1 deletion runtest.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
--local endTime = os.time() + 3
if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
require("lldebugger").start(true)
end

--local endTime = os.time() + 3
--while os.time() < endTime do end

require "pretty-printer" -- has side-effect of loading global p()
Expand Down

0 comments on commit c9153be

Please sign in to comment.