Closed jonathan-elize closed 1 month ago
Thanks for the PR but there is already a solution for this. See https://github.com/mfussenegger/nvim-dap/issues/1104#issuecomment-1835734572
I'm also thinking of always loading launch.json implicitly when starting a debug session and drop the filetype-type mapping part. Having more config options for it would counter that plan. See https://github.com/mfussenegger/nvim-dap/issues/1226 for details
I use nvim-dap-vscode-js to debug javascript and typescript files. It sets up adapters automatically with various names such as
pwa-node
.In launch.json files, the "type" that is put for debugging javascript and typescript files I've found to usually be set to "node". Since right now the type is used to find the adapter by name in nvim-dap, trying to debug using these configs is failing by default since I don't have an adapter named "node". I'm creating this PR to be able to map type from the launch.json configuration to the adapter you would want to use in Neovim.
In my case, with this change I can now do this to load debug options from launch.json and run them successfully.