Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

a Debug Adapter that allows debugging lua plugins written for Neovim

Notifications You must be signed in to change notification settings

mfussenegger/nvim-lua-debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

UNMAINTAINED

This was a prototype that never made it into a workable state. There is now lua-debug.nvim which can be used instead.

Neovim Lua Debug Adapter

nvim-lua-debugger is a Debug Adapter that allows debugging lua plugins written for Neovim. It is the server component in the Debug Adapter Protocol.

To use the debugger you'll need a client implementing the Debug Adapter Protocol:

MVP TODO

  • initialization parts of the protocol
  • setting breakpoints
  • stopped event
  • threads request handling
  • stackTrace request handling
  • scopes request handling
  • variables request handling

Installation

  • Requires Neovim HEAD/nightly
  • nvim-lua-debugger is a plugin. Install it like any other Vim plugin.
  • Call :packadd nvim-lua-debugger if you install nvim-lua-debugger to 'packpath'.

Usage with nvim-dap

Add a new adapter entry:

local dap = require('dap')
dap.adapters.neovim = function(callback)
  local server = require('lua_debugger').launch()
  callback({ type = 'server'; host = server.host; port = server.port; })
end

Add a new configuration entry:

local dap = require('dap')
dap.configurations.lua = {
  {
    type = 'neovim';
    request = 'attach';
    name = "Attach to running neovim instance";
  },
}

Then edit a lua file within Neovim and call :lua require'dap'.continue() to start debugging.

About

a Debug Adapter that allows debugging lua plugins written for Neovim

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages