Fix stdout suppression in dotnet watch with --no-hot-reload#52836
Fix stdout suppression in dotnet watch with --no-hot-reload#52836
Conversation
Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
|
@copilot please add a test |
Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
|
@copilot Revert formatting changes. |
Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
The existing tests ( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Fixes a regression in dotnet watch “no hot reload” mode where the launched app’s stdout wasn’t forwarded to the terminal by ensuring the process runner is configured to capture and report output in that code path.
Changes:
- Set
ProcessSpec.OnOutputinDotNetWatcher.WatchAsyncso stdout/stderr are redirected and forwarded viaIProcessOutputReporter. - Add an integration-style test to validate output is captured when running
dotnet watchwith--no-hot-reload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BuiltInTools/dotnet-watch/Watch/DotNetWatcher.cs | Ensures app process output is forwarded by wiring ProcessSpec.OnOutput to ProcessOutputReporter. |
| test/dotnet-watch.Tests/Watch/NoDepsAppTests.cs | Adds a test asserting the app’s output is observable when --no-hot-reload is used. |
dotnet watch run --no-hot-reloadis used, stdout is suppressedOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.