1. Install
- Install LuaDebug from the Cursor / VS Code marketplace.
- Open your Lua script folder only (opening a full game repo makes indexing very slow).
- Disable other extensions that claim debugger type=
lua(e.g. older LuaIde), or the Add Configuration list may be wrong.
2. Register & sign in
- Open the LuaDebug activity bar.
- Register with email and complete verification.
- Sign in to unlock language features and debugging.
Forgot password: use “Forgot password” in the activity bar. Default luadebug.serverUrl is https://luadebug.walterspace.com.
3. Copy debug runtime
Runtime files live in the extension’s luadebug folder. After install or extension updates, copy them again into a path your project can load.
LuaDebug.lua— PUC-Rio LuaLuaDebugjit.lua— LuaJIT (most Cocos / Unity hot-reload setups)- OpenResty build — see Frameworks
Call it early in the game startup path, for example:
local breakSocketHandle, debugXpCall = require("LuaDebugjit")("127.0.0.1", 7003)
-- Cocos: schedule breakSocketHandle on the director; see Frameworks
host / port must match launch. On a device, use the PC’s LAN IP, not 127.0.0.1.
4. Configure launch
- Open Run and Debug.
- No
.vscode/launch.json: create launch.json and pick LuaDebug. - Existing file: Add Configuration… → pick a
LuaDebug:snippet. - Adjust
localRoot,port,exePath/commandLinefor your project.
No LuaDebug in the list: confirm the extension is enabled and you are signed in; disable other type=lua debuggers, then reload the window.
Details: Debug, Frameworks.
5. Start debugging
- Set breakpoints in Lua source.
- First start the editor debugger (listens on the port).
- Then start the game / client so StartDebug runs.
- When a breakpoint hits, inspect variables, stack, and step (F10 / F11, etc.).