A standalone Lua debugger extension for Visual Studio Code, extracted from EmmyLua/VSCode-EmmyLua.
LuaDebugger contains only the debug functionality — no language server, no code completion, no diagnostics. Pair it with your favourite Lua language extension (e.g. Lua) and use LuaDebugger to debug Lua programs.
The extension contributes three debugger types:
| Type | Description |
|---|---|
luadebugger_new |
TCP socket debugger. The IDE connects to (or listens for) a Lua state. |
luadebugger_attach |
Attach to a running process (Windows only). |
luadebugger_launch |
Launch a Lua executable and attach to it (Windows only). |
-
Create a
launch.jsonconfiguration:{ "type": "luadebugger_new", "request": "launch", "name": "LuaDebugger New Debug", "host": "localhost", "port": 9966, "ideConnectDebugger": true } -
In your Lua program, load the
emmy_coremodule and start the TCP listener:package.cpath = package.cpath .. ";<extension>/debugger/emmy/windows/x64/?.dll" local dbg = require("emmy_core") dbg.tcpListen("localhost", 9966)
You can also run the LuaDebugger: Insert Lua Debugger Code command to insert this snippet automatically.
luadebugger.source.roots— additional directories used to resolve Lua source files while debugging.
- Visual Studio Code
1.89.0or newer. - A Lua language extension that provides the
lualanguage id (for breakpoints). - The
emmy_corenative module for your platform (bundled indebugger/emmy/{windows,mac,linux}).
Apache-2.0. LuaDebugger is derived from EmmyLua/VSCode-EmmyLua (Copyright (c) 2017 tangzx) and bundles the EmmyLuaDebugger native debugger core.