mxsdev / nvim-dap-vscode-js

nvim-dap adapter for vscode-js-debug
276 stars 30 forks source link

Please help -- looking for in-depth example of using `google-chrome-stable` with `nvim-dap` and `microsoft/vscode-js-debug` #21

Open elmarsto opened 1 year ago

elmarsto commented 1 year ago

This is a super-common stack which is directly supported by this codebase, so it would be beyond rad if we could have a substantial example in the docs showing how to combine these:

TBH I'm stumped -- I keep getting:

image

I have a slightly idiosyncratic way of grouping dependencies everything works except specifically nvim-dap-vscode-js, and my intuition, plus having attempted various other options, including program, with the same result, suggests that the problem is with how I've configured nvim-dap-vscode-js rather than Packer.

EDIT After rereading the message above, I need to clarify that I've naively played with specifying a lot of options, including the obvious address and server, but with no change in error. I figured I'd make a minimally reproducible example. What am I getting wrong below?

  use { "mfussenegger/nvim-dap",
    requires = { 
       "mxsdev/nvim-dap-vscode-js",
       { "microsoft/vscode-js-debug", opt = true, run = "npm install --legacy-peer-deps && npm run compile" },
     },
    config = function()
      require "dap-vscode-js".setup({
        adapters = { 'pwa-chrome' },
        log_file_path = "/tmp/dap_vscode_js.log",
        log_file_level = vim.log.levels.INFO
        log_console_level = vim.log.levels.INFO
      })
      for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
        require("dap").configurations[language] = {
          {
            type = "pwa-chrome",
            request = "launch",
            name = "Chrome Launch",
          },
        }
     end
    end
  }
anasrar commented 1 year ago

@elmarsto check

mxsdev commented 1 year ago

@elmarsto Does #23 fix the issue?