From 0a6cb6117bfe8ab42f0661652abd43aef7eabaac Mon Sep 17 00:00:00 2001 From: Andrew Farkas <6060305+HactarCE@users.noreply.github.com> Date: Fri, 21 Nov 2025 04:20:15 -0500 Subject: [PATCH] Fix `connect.host` setting being ignored by debugpy (#43190) Closes #42727 Unfortunately we can only support IPv4 addresses right now because `TcpArguments` only supports an IPv4 address. I'm not sure how difficult it would be to lift this limitation. Release Notes: - Fixed `connect.host` setting being ignored by debugpy Co-authored-by: Cole Miller --- crates/dap_adapters/src/python.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/dap_adapters/src/python.rs b/crates/dap_adapters/src/python.rs index 4d81e5ba851305ae3adc2ee0a6ab6a29f43edd62..2f84193ac9343cac9ff1cf52eb648bad1cd77896 100644 --- a/crates/dap_adapters/src/python.rs +++ b/crates/dap_adapters/src/python.rs @@ -368,6 +368,9 @@ impl PythonDebugAdapter { bail!("Cannot have two different ports in debug configuration") } + if let Some(hostname) = config_host { + tcp_connection.host = Some(hostname.parse().context("hostname must be IPv4")?); + } tcp_connection.port = config_port; DebugpyLaunchMode::AttachWithConnect { host: config_host } } else {