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 {