From 0feb1c2bf8c62ba02834340bf1052e8fcafd531a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 4 Sep 2024 13:57:48 +0200 Subject: Rust debugger support --- lua/debugging.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lua') diff --git a/lua/debugging.lua b/lua/debugging.lua index 82f073b..bb57624 100644 --- a/lua/debugging.lua +++ b/lua/debugging.lua @@ -18,6 +18,12 @@ dap.adapters.php = { args = { '/usr/lib/node_modules/php-debug/out/phpDebug.js' } } +dap.adapters.rust_gdb = { + type = "executable", + command = "rust-gdb", + args = { "-i", "dap" } +} + -- -- Configurations -- @@ -33,6 +39,18 @@ dap.configurations.c = { }, } +dap.configurations.rust = { + { + name = "Launch", + type = "rust_gdb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug', 'file') + end, + cwd = "${workspacefolder}", + }, +} + dap.configurations.php = { { name = "Listen for Xdebug", -- cgit v1.2.3