Skip to content

Repository files navigation

LuaDebugger

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.

Debug Types

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).

Quick start with luadebugger_new

  1. Create a launch.json configuration:

    {
        "type": "luadebugger_new",
        "request": "launch",
        "name": "LuaDebugger New Debug",
        "host": "localhost",
        "port": 9966,
        "ideConnectDebugger": true
    }
  2. In your Lua program, load the emmy_core module 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.

Configuration

  • luadebugger.source.roots — additional directories used to resolve Lua source files while debugging.

Requirements

  • Visual Studio Code 1.89.0 or newer.
  • A Lua language extension that provides the lua language id (for breakpoints).
  • The emmy_core native module for your platform (bundled in debugger/emmy/{windows,mac,linux}).

License

Apache-2.0. LuaDebugger is derived from EmmyLua/VSCode-EmmyLua (Copyright (c) 2017 tangzx) and bundles the EmmyLuaDebugger native debugger core.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages