Skip to content

Nvim integration errors: log messages output at the same time as DAP messages #290

@matheusgomes28

Description

@matheusgomes28

I've followed the instructions in the nvim-dap docs to setup the brightscript debugger (link here). However, when starting the debugger, I get the following error message:

Error  13:18:19 msg_show.lua_error Error executing callback:
...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: ...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:30: Content-Length not found in headers: [13:18:19.496][LOG  ] [dap][session] initializeRequest
Content-Length: 46
stack traceback:
	[C]: in function 'parse_chunk'
	...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: in function <...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:85>
   Error  13:18:19 msg_show.lua_error Error executing callback:
...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: cannot resume dead coroutine
stack traceback:
	[C]: in function 'parse_chunk'
	...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: in function <...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:85>
   Error  13:18:19 msg_show.lua_error Error executing callback:
...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: cannot resume dead coroutine
stack traceback:
	[C]: in function 'parse_chunk'
	...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:97: in function <...<HOME_PATH>/.local/share/nvim/lazy/nvim-dap/lua/dap/rpc.lua:85>
13:18:14 msg_showcmd :

Here's my ../plugins/dap.lua configuration:

return {
  {
    "mfussenegger/nvim-dap",
    config = function()
      local dap = require("dap")
      -- Register BrightScript adapter (using roku-debug via wrapper that suppresses stderr)
      dap.adapters.brightscript = {
        type = "executable",
        command = "npx",
        args = { "roku-debug", "--dap" },
      }

      -- Register BrightScript configurations
      dap.configurations.brs = {
        {

          type = "brightscript",
          request = "launch",
          name = "Debug app",
          rootDir = "${workspaceFolder}",
          files = {
            "manifest",
            "source/**/*.*",
            "components/**/*.*",
            "images/**/*.*",
            "locale/**/*.*",
          },
          host = "${env:ROKU_DEV_TARGET}",
          remotePort = 8060,
          password = "${env:DEVPASSWORD}",
          outDir = "${workspaceFolder}/out/",
          enableDebugProtocol = true,
          fileLogging = false,
          enableVariablesPanel = true,
          logLevel = "off",
        },
      }
      -- Also make BRS an alias for brightscript (for autocmd filetype detection)
      dap.configurations.brightscript = dap.configurations.brs
    end,
  },
}

Am I missing something or is the executable printing stuff to stdout at the same time as the DAP messages?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions