From 8ddb3ae17e2d540180c3132de438b0c225e963bb Mon Sep 17 00:00:00 2001 From: mace Date: Wed, 25 Dec 2024 17:24:40 +0100 Subject: [PATCH] added php debug settings --- lua/kickstart/plugins/debug.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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.' })