Make python debugger name debugpy

Most dap configurations expect `debugpy` as the name, not `python`.
This causes breakages in the very common case in many python repositories which have their debug config set up in `.vscode/launch.json` with `type: "debugpy"` and not `type: "python"`.
See [here](https://code.visualstudio.com/docs/python/debugging#_set-configuration-options)
This commit is contained in:
Howard Nguyen-Huu 2025-04-18 19:04:21 -04:00 committed by GitHub
commit b457d2766e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@
# idk if this is the best way to install/run debugpy # idk if this is the best way to install/run debugpy
package = pkgs.python3.withPackages (ps: with ps; [debugpy]); package = pkgs.python3.withPackages (ps: with ps; [debugpy]);
dapConfig = '' dapConfig = ''
dap.adapters.python = function(cb, config) dap.adapters.debugpy = function(cb, config)
if config.request == 'attach' then if config.request == 'attach' then
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
local port = (config.connect or config).port local port = (config.connect or config).port
@ -125,10 +125,10 @@
end end
end end
dap.configurations.python = { dap.configurations.debugpy = {
{ {
-- The first three options are required by nvim-dap -- The first three options are required by nvim-dap
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.debugpy`
request = 'launch'; request = 'launch';
name = "Launch file"; name = "Launch file";