cli: Support --foreground for debugging (#11819)

Release Notes:

- Added `--foreground` to the cli to allow running zed on the current
PTY.
This commit is contained in:
Conrad Irwin 2024-05-14 16:05:40 -06:00 committed by GitHub
parent 18b6ded8f0
commit 5b2c019f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 70 additions and 28 deletions

View file

@ -12,7 +12,7 @@ Currently the two instances connect via Zed's servers, but we intend to build pe
## Setup
> **Note**: You must be in the alpha program to see this UI. The instructions will likely change as the feature gets closer to launch.
> NOTE: You must be in the alpha program to see this UI. The instructions will likely change as the feature gets closer to launch.
1. Open the projects dialog with `cmd-option-o` and then click "Connect…".
2. Click "Add Server"
@ -21,20 +21,26 @@ Currently the two instances connect via Zed's servers, but we intend to build pe
```
curl https://zed.dev/install.sh | bash
```
5. On the remote machine, paste the instructions from step 3.
> **Note**: Currently you must keep this process open. We are working on making it background itself.
> In the meantime, you can run `nohup zed --dev-server-token YY.XXX >~/.zed-log 2>&1 &`
5. On the remote machine, paste the instructions from step 3. You should see `connected!`.
> NOTE: If this command runs but doesn't output anything, try running `zed --foreground --dev-server-token YY.XXX`. It is possible that the zed background process is crashing on startup.
6. On your laptop you can now open folders on the remote machine.
> **Note**: Zed does not currently handle opening very large directories (e.g. `/` or `~` that may have >100,000 files) very well. We are working on improving this, but suggest in the meantime opening only specific projects, or subfolders of very large mono-repos.
> NOTE: Zed does not currently handle opening very large directories (e.g. `/` or `~` that may have >100,000 files) very well. We are working on improving this, but suggest in the meantime opening only specific projects, or subfolders of very large mono-repos.
## Supported platforms
The remote machine must be able to run Zed. The following platforms should work, though note that we have not exhaustively tested every linux distribution:
* macOS Catalina or later (Intel or Apple Silicon))
* Linux (x86_64 only). You must have `glibc` installed at version 2.29 (released in 2019) or greater and available globally.
* Windows is not yet supported.
## Known Limitations
- The Terminal does not work remotely.
- You cannot spawn Tasks remotely.
- Extensions aren't yet supported in headless Zed.
- You can not run `zed` in headless mode and in GUI mode at the same time on the same machine.
## Feedback
- Please join the [#remoting-feedback](https://discord.com/channels/869392257814519848/1235290452270387241) Discord channel.
- Please join the #remoting-feedback in the [Zed Discord](https://discord.gg/qSDQ8VWc7k).