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 <cole@zed.dev>
This commit is contained in:
Andrew Farkas
2025-11-21 09:20:15 +00:00
committed by GitHub
co-authored by Cole Miller
parent e2f6422b3e
commit 0a6cb6117b
+3
View File
@@ -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 {