A powerful Debug Adapter Protocol (DAP) implementation for Lua debugging
Built on top of the robust EmmyLuaDebugger foundation
- 🎯 Debug Adapter Protocol (DAP) compatible
- 🔧 Cross-platform support (Windows, Linux, macOS)
- 🚀 Easy integration with any DAP-compatible editor
- 🐛 Advanced debugging capabilities for Lua applications
- 🌟 LuaJIT support for high-performance Lua applications
- 📁 Multiple file extensions support (.lua, .lua.txt, .lua.bytes)
- 🌐 TCP connection for remote debugging
- Download the latest release from the releases page
- Extract the executable to your desired location
- Ensure the
emmy_core
library is available in your Lua environment
Add the following debug code to your Lua application:
-- Add the emmy_core library to your package path
package.cpath = package.cpath .. ";<path_to_emmy_core>/?.dll"
-- Initialize the debugger
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9966)
-- Optional: Wait for IDE connection
-- dbg.waitIDE()
-- Optional: Set a breakpoint
-- dbg.breakHere()
-- Add the emmy_core library to your package path
package.cpath = package.cpath .. ";<path_to_emmy_core>/?.so"
-- Initialize the debugger
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9966)
-- Optional: Wait for IDE connection
-- dbg.waitIDE()
-- Optional: Set a breakpoint
-- dbg.breakHere()
-- Add the emmy_core library to your package path
package.cpath = package.cpath .. ";<path_to_emmy_core>/?.dylib"
-- Initialize the debugger
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9966)
-- Optional: Wait for IDE connection
-- dbg.waitIDE()
-- Optional: Set a breakpoint
-- dbg.breakHere()
Create a launch configuration in your editor:
{
"type": "emmylua_new",
"request": "launch",
"name": "🐛 EmmyLua Debug Session",
"host": "localhost",
"port": 9966,
"sourcePaths": [
"${workspaceFolder}"
],
"ext": [
".lua",
".lua.txt",
".lua.bytes"
],
"ideConnectDebugger": true
}
- Add debug code to your Lua application (see setup section above)
- Start your Lua program - it will wait for the debugger to connect
- Launch the debug session from your editor using the DAP configuration
- Set breakpoints and start debugging! 🎉
Currently, the EmmyLua extension does not use this project as its DAP implementation.
- Use
nvim-dap
plugin - Configure the DAP adapter
- Set up launch configuration
- Install the "LSP4IJ" plugin
- Configure the DAP adapter in the dap configuration
- Set up a run configuration for your Lua application
Any editor that supports the Debug Adapter Protocol can be used:
- Vim (with DAP plugins)
- Emacs (with DAP mode)
- Eclipse (with DAP extensions)
Option | Type | Description | Default |
---|---|---|---|
host |
string | Debug server host | "localhost" |
port |
number | Debug server port | 9966 |
sourcePaths |
array | Source code directories | ["${workspaceFolder}"] |
ext |
array | Supported file extensions | [".lua", ".lua.txt", ".lua.bytes"] |
ideConnectDebugger |
boolean | IDE initiates connection | true |
We welcome contributions! Please feel free to:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
- 📚 Improve documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- EmmyLuaDebugger - The core debugging engine
- Contributors who help improve this project