Prevent infinite stream iteration when func host task terminates#4887
Merged
nturinski merged 2 commits intonat/debuggerViewfrom Jan 15, 2026
Merged
Prevent infinite stream iteration when func host task terminates#4887nturinski merged 2 commits intonat/debuggerViewfrom
nturinski merged 2 commits intonat/debuggerViewfrom
Conversation
Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on Function Host Debugger View
Prevent infinite stream iteration when func host task terminates
Jan 15, 2026
nturinski
added a commit
that referenced
this pull request
Mar 26, 2026
* Implementation for debug-isolated flag and streaming func CLI output * Update src/utils/stream.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address copilot feedback * Refactor to set up stream in funcHostTasks * Delete test snippet * Add headerto stream file * Remove the done call * Update src/debug/FuncTaskProvider.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * WIP waiting for VSCode insiders fix * Use onDidStartTerminalShellExecution API instead of proposed * Remove proposed files * Add note * Remove unused async moniker * Whoops, wrong async * Little bit of cleaning * Remove unusued function helper * Last commit, I swears it * Move event handler, added note * Rename function due to PR feedback * Push up WIP * Push up WIP * WIP for postDebug copilot analysis * Add debug command activity * WIP for copilot postdebug * Merge with main * Fix linter * MVP for func debugger view * Setting for debugger view, show first error * Refactoring/cleaning up * Remove the stop action and implement clear errors * Clean up some code * Remove the terminal dispose since it is not reinstantiated later * Update src/funcCoreTools/funcHostTask.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/funcCoreTools/funcHostErrorUtils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add JSDoc documentation for IStartFuncProcessResult stream property (#4885) * Initial plan * Add JSDoc documentation for IStartFuncProcessResult interface Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com> * Prevent infinite stream iteration when func host task terminates (#4887) * Initial plan * Add AbortController to prevent infinite stream iteration Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com> * Update src/debug/FunctionHostDebugView.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove exhaustive check from switch statement Removed exhaustive check for FuncHostDebugNode. * npm install to update package-lock * Convert shell args to be an array * Fix duplicate log entries, fix func start tasks with args not being recognized * Clean up some of the code * Fix imports in tests * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * PR feedback * Debugger view always visible but collapsed by default * Display stopped hosts as well * Expose ask copilot on top level node * Make labels a bit more descriptive * Refactor into individual tree items * Remove enums that are not shared --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nathan Turinski <naturins@microsoft.comm> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
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.
The async iteration over
task.streamin theonFuncTaskStartedevent handler could hang indefinitely when the task ends, as the stream might not close properly.Changes:
AbortControllertoIRunningFuncTaskto signal stream terminationonDidEndTaskhandler before removing task from map💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.