Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger don't work with imports/packages #60

Open
IgberZBN opened this issue Sep 29, 2023 · 1 comment
Open

Debugger don't work with imports/packages #60

IgberZBN opened this issue Sep 29, 2023 · 1 comment

Comments

@IgberZBN
Copy link

When I debug a code without importing none of it works normally.
image

But when there is an import it doesn't work. It opens the UI but ends soon after.
image

My plugins.lua

{
    "mfussenegger/nvim-dap",
    config = function()
      require "custom.configs.dap"
      require("core.utils").load_mappings "dap"
    end,
  },

  {
    "rcarriga/nvim-dap-ui",
    event = "VeryLazy",
    dependencies = "mfussenegger/nvim-dap",
    config = function()
      local dap = require "dap"
      local dapui = require "dapui"
      dapui.setup()
      dap.listeners.after.event_initialized["dapui_config"] = function()
        dapui.open()
      end
      dap.listeners.before.event_terminated["dapui_config"] = function()
        dapui.close()
      end
      dap.listeners.before.event_exited["dapui_config"] = function()
        dapui.close()
      end
    end,
  },
  {
    "mxsdev/nvim-dap-vscode-js",
    dependencies = "mfussenegger/nvim-dap",
    ft = { "javascript", "typescript" },
  },

My configs dap.config

local dap = require "dap"

require("dap").adapters["pwa-node"] = {
  type = "server",
  host = "localhost",
  port = "${port}",
  executable = {
    command = "node",
    args = { "/home/igber/Documents/js-debug/src/dapDebugServer.js", "${port}" },
  },
}

for _, language in ipairs { "typescript", "javascript" } do
  dap.configurations[language] = {
    {
      type = "pwa-node",
      request = "launch",
      name = "Launch file",
      program = "${file}",
      cwd = "${workspaceFolder}",
    },
  }
end
@josephemorgan
Copy link

Of course I didn't see this until after I posted my issue, but I guess since this hasn't gotten any response in 6 months I was probably wasting my time anyway.

Same issue here, default config, I linked a simple repro. At this point I'm wondering if anyone is able to use this extension for debugging via launch.

My issue: #69 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants