Getting Started

From install to first breakpoint

Install → sign in → copy runtime → launch.json → start the debugger before the game.

1. Install

  1. Install LuaDebug from the Cursor / VS Code marketplace.
  2. Open your Lua script folder only (opening a full game repo makes indexing very slow).
  3. Disable other extensions that claim debugger type=lua (e.g. older LuaIde), or the Add Configuration list may be wrong.

2. Register & sign in

  1. Open the LuaDebug activity bar.
  2. Register with email and complete verification.
  3. 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.

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

  1. Open Run and Debug.
  2. No .vscode/launch.json: create launch.json and pick LuaDebug.
  3. Existing file: Add Configuration… → pick a LuaDebug: snippet.
  4. Adjust localRoot, port, exePath / commandLine for 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

  1. Set breakpoints in Lua source.
  2. First start the editor debugger (listens on the port).
  3. Then start the game / client so StartDebug runs.
  4. When a breakpoint hits, inspect variables, stack, and step (F10 / F11, etc.).