Add Zed tasks, debug configurations, and ignore log files - #737
Merged
Merged
Conversation
Zed supports executing build workflows via project tasks configured in .zed/tasks.json. This commit adds tasks for Gatekeeper in .zed/tasks.json: 1. 'Gatekeeper: Build' to run 'make -j' and save all modified buffers before building; and 2. 'Gatekeeper: Clean' to run 'make clean'.
Gatekeeper requires root privileges to access hugepages and network
hardware. When debugging in Zed via the CodeLLDB debug adapter, the
editor communicates headlessly over the Debug Adapter Protocol (DAP)
and cannot interactively prompt for sudo credentials. Additionally,
pre-debug tasks in Zed wait for commands to exit, which would cause
a persistent daemon like lldb-server to hang the launch sequence.
This commit adds debugging support for Zed:
1. adds .zed/debug.json configuring CodeLLDB launch and attach
profiles;
2. adds helper script .zed/start-lldb-server.sh to run lldb-server
as root in the background; and
3. adds tasks 'Gatekeeper: Start lldb-server' and 'Gatekeeper: Stop
lldb-server' to .zed/tasks.json.
The helper script and configuration resolve several platform details:
- verify that kernel.yama.ptrace_scope is not set to 3 ('No Attach'),
which permanently blocks ptrace(2) system-wide, even for root;
- resolve the canonical binary path with readlink(1) so the platform
server finds its versioned worker stub (lldb-server-<version>);
- authenticate sudo(8) in the foreground terminal before spawning the
daemon with setsid(1) so cached TTY tickets are honored; and
- disable target.auto-install-main-executable in LLDB to prevent
unnecessary file transfers over the local platform connection.
Running Gatekeeper during testing or debugging generates timestamped log files in the working directory named gatekeeper_YYYY_MM_DD_HH_MM.log. This commit adds pattern 'gatekeeper_*.log' to .gitignore to keep the repository clean.
AltraMayor
force-pushed
the
zed-tasks
branch
from
September 23, 2026 19:56
75d2102 to
9774100
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for Zed editor workflows in Gatekeeper:
.zed/tasks.jsonto build (make -j) and clean (make clean) the project..zed/debug.jsonand a helper script.zed/start-lldb-server.shto runlldb-serverwith root privileges in the background, resolving DAP headless permission and ptrace attachment limitations. Also adds corresponding Zed tasks to start and stoplldb-server.gatekeeper_*.logto.gitignoreto prevent generated runtime log files from cluttering the working directory.