diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index b08ee7c..68bb9de 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -29,6 +29,7 @@ return { -- Makes a best effort to setup the various debuggers with -- reasonable debug configurations automatic_setup = true, + automatic_installation = true, -- You can provide additional configuration to the handlers, -- see mason-nvim-dap README for more information @@ -74,6 +75,25 @@ return { }, } + -- PHP + dap.adapters.php = { + type = "executable", + command = "node", + args = { "/home/mace/.local/share/nvim/mason/packages/php-debug-adapter/extension/out/phpDebug.js" } + } + + dap.configurations.php = { + { + type = "php", + request = "launch", + name = "Listen for Xdebug", + port = 9003, + pathMappings = { + ["/path/on/server"] = "/path/on/local/machine", -- Adjust to map your server paths to local paths + }, + }, + } + -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. vim.keymap.set('n', '', dapui.toggle, { desc = 'Debug: See last session result.' })