From cefa2fb76e9751aad59083ed4e392658b4e42161 Mon Sep 17 00:00:00 2001 From: Jarmo Cluyse Date: Thu, 28 Nov 2024 11:37:26 +0100 Subject: [PATCH 1/2] fix: commandLineArgs were incorrectly applied in debugger changed the vim.tbl_deep_extend to a for loop table.insert --- lua/csharp/features/debugger/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/csharp/features/debugger/init.lua b/lua/csharp/features/debugger/init.lua index 06784b0..21cb661 100644 --- a/lua/csharp/features/debugger/init.lua +++ b/lua/csharp/features/debugger/init.lua @@ -17,7 +17,10 @@ local function apply_launch_profile(debug_config, launch_profile) end if launch_profile.commandLineArgs then - vim.tbl_deep_extend("force", debug_config.args, vim.split(launch_profile.commandLineArgs, " ", { trimempty = true })) + local args = vim.split(launch_profile.commandLineArgs, " ", { trimempty = true }) + for _, arg in args do + table.insert(debug_config.args, arg) + end end if launch_profile.applicationUrl then From cbeacf15e4ff2765b565d5df68e57379f3cd3ff2 Mon Sep 17 00:00:00 2001 From: Jarmo Cluyse Date: Thu, 28 Nov 2024 14:17:46 +0100 Subject: [PATCH 2/2] fix: args needed ipairs --- lua/csharp/features/debugger/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/csharp/features/debugger/init.lua b/lua/csharp/features/debugger/init.lua index 21cb661..d626796 100644 --- a/lua/csharp/features/debugger/init.lua +++ b/lua/csharp/features/debugger/init.lua @@ -18,7 +18,7 @@ local function apply_launch_profile(debug_config, launch_profile) if launch_profile.commandLineArgs then local args = vim.split(launch_profile.commandLineArgs, " ", { trimempty = true }) - for _, arg in args do + for _, arg in ipairs(args) do table.insert(debug_config.args, arg) end end