Add initial support for WSL (#37035)
Closes #36188 ## Todo * [x] CLI * [x] terminals * [x] tasks ## For future PRs * debugging * UI for opening WSL projects * fixing workspace state restoration Release Notes: - Windows alpha: Zed now supports editing folders in WSL. --------- Co-authored-by: Junkui Zhang <364772080@qq.com>
This commit is contained in:
co-authored by
Junkui Zhang
parent
1c2e2a00fe
commit
f78f3e7729
@@ -258,8 +258,14 @@ impl DapStore {
|
||||
let connection;
|
||||
if let Some(c) = binary.connection {
|
||||
let host = Ipv4Addr::LOCALHOST;
|
||||
let port = dap::transport::TcpTransport::unused_port(host).await?;
|
||||
port_forwarding = Some((port, c.host.to_string(), c.port));
|
||||
let port;
|
||||
if remote.read_with(cx, |remote, _cx| remote.shares_network_interface())? {
|
||||
port = c.port;
|
||||
port_forwarding = None;
|
||||
} else {
|
||||
port = dap::transport::TcpTransport::unused_port(host).await?;
|
||||
port_forwarding = Some((port, c.host.to_string(), c.port));
|
||||
}
|
||||
connection = Some(TcpArguments {
|
||||
port,
|
||||
host,
|
||||
|
||||
Reference in New Issue
Block a user