chore Kill orphaned watch processes on shutdown to fix wedged debug launches#825
Open
chrisdp wants to merge 1 commit into
Open
chore Kill orphaned watch processes on shutdown to fix wedged debug launches#825chrisdp wants to merge 1 commit into
chrisdp wants to merge 1 commit into
Conversation
watch-all now spawns each watcher in its own process group and kills the whole npm/tsc/vite subtree on shutdown, and cleans up watchers left by a previous run that exited ungracefully. Adds a cross-platform reset-dev recovery task and a scripts/tsconfig.json so the editor type-checks the scripts dir.
TwitchBronBron
requested changes
Jun 22, 2026
TwitchBronBron
left a comment
Member
There was a problem hiding this comment.
I'm not totally convinced this is the problem, and i'm not loving the processId concept in general. Let's troubleshoot a few times where you run just the task to prove out that it solves the problem.
| ); | ||
| const watchers: ChildProcess[] = []; | ||
|
|
||
| function killGroup(pid: number) { |
Member
There was a problem hiding this comment.
Let's harden this slightly, to ensure we don't just kill any arbitrary process with that id. (maybe store PID and process name) and compare them before doing the kill.
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.
When the Extension Development Host is relaunched,
watch-allleft itsnpm→tsc/vitesubtree running because only thets-nodeparent was terminated. Those orphaned watchers piled up across launches, fighting overdist/and the debug host until a window reload or full restart was needed.watch-allnow spawns each watcher in its own process group and kills the whole subtree onSIGINT/SIGTERM/SIGHUP/exit.reset-devtask to clear stale watchers and dev ext-host windows when a launch still gets stuck.scripts/tsconfig.jsonso the editor type-checks thescripts/dir (clears thedebounce/deferred/down-level-iteration errors); removed a dead local and an unused import that surfaced.