I have python debugging integrated in neovim dap.
-- configure DAP for Python debugging
local M = {}
M.setup = function()
local dap = require("dap")
dap.adapters.python = {
type = "executable",
command = "python3",
args = { "-m", "debugpy.adapter" },
}
dap.configurations.python = {
{
type = "python",
request = "launch",
name = "Launch file",
program = "${file}",
pythonPath = function()
return "/usr/bin/python3"
end,
This file has been truncated. show original
I am trying to replicate this with mojo, I am initially interested to debug tests. This is my current attempt.
local M = {}
M.setup = function()
local dap = require("dap")
dap.adapters["mojo"] = {
type = "executable",
command = "mojo",
args = { "test", "--vscode", "--stop-on-entry", "-I", "." },
name = "mojo",
}
local mojo = {
name = "Launch mojo test",
type = "mojo", -- matches the adapter
request = "launch", -- could also attach to a currently running process
program = "${file}",
cwd = "${workspaceFolder}",
}
dap.configurations.mojo = {
This file has been truncated. show original
The debug session starts but then mojo exits with a status of 0 and dap displays a notification that the application is slow to respond. I tried with and without --stop-on-entry