From 9ec334acec797440e7353bfd008bf655d112dc57 Mon Sep 17 00:00:00 2001 From: "Adam K." Date: Tue, 18 Jun 2024 13:28:18 -0500 Subject: [PATCH] fix(dap): avoid launching extra console On Windows, when using dap, python.exe will launch an extra console. If you target pythonw.exe this avoids that. Explanation source: https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe --- lua/lazyvim/plugins/extras/lang/python.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 9aeca2a4..399f28e3 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -93,7 +93,7 @@ return { }, config = function() if vim.fn.has("win32") == 1 then - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/python.exe")) + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/pythonw.exe")) else require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) end