-
Notifications
You must be signed in to change notification settings - Fork 234
Description
One current limitation of the command runner implementation is that when running azd with --debug
, if the command being executed takes a very long time or appears to be stuck, neither the command or output gets logged until the process exits.
Originally posted by @weikanglim in #5501 (comment):
Right now our command runner only logs the full output of the command after execution:
2025/07/17 19:22:52 command_runner.go:310: Run exec: 'git --version' , exit code: 0
-------------------------------------stdout-------------------------------------------
git version 2.45.3
A possible enhancement is to split this out into two messages:
2025/07/17 19:22:52 command_runner.go:310: Start: 'git --version'
2025/07/17 19:22:52 command_runner.go:310: Stop: 'git --version' , exit code: 0
-------------------------------------stdout-------------------------------------------
git version 2.45.3
A further enhancement could be to support streaming the command output in real-time, which would make it easier to observe and debug cases like #5491, where the command being executed initiated a long-running process:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5241
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: /workspaces/junk_20250716/Something