You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix deadlock when redirecting large amounts of child process output, and add ability to not redirect child process behavior
- Use a small set of tasks to consume and ignore arbitrary data passed through standard output/error
- Add a new switch to dotnet-trace called --redirect-child-output which can be set to false to allow viewing data. (By default the option defaults to true, which may be confusing. I'd like some feedback on that.
* Adjust dotnet-trace to add --show-child-output and improve exit code handling
* Add testing
* Update doc in repo
* Fix issues identified in testing
* Move logic which waited for process to exit to avoid premature Dispose operations
* Code review feedback
Copy file name to clipboardExpand all lines: documentation/design-docs/dotnet-tools.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -311,7 +311,7 @@ COLLECT
311
311
[--providers <list-of-comma-separated-providers>]
312
312
[--format <trace-file-format>]
313
313
314
-
Collects a diagnostic trace from a currently running process
314
+
Collects a diagnostic trace from a currently running process or launch a child process and trace it. Append -- to the collect command to instruct the tool to run a command and trace it immediately.
315
315
316
316
-p, --process-id
317
317
The process to collect the trace from
@@ -351,6 +351,8 @@ COLLECT
351
351
--format
352
352
The format of the output trace file. The default value is nettrace.
353
353
354
+
--show-child-io
355
+
Shows the input and output streams of a launched child process in the current console.
Copy file name to clipboardExpand all lines: documentation/dotnet-trace-instructions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ Press <Enter> or <Ctrl+C> to exit...
87
87
You can stop collecting the trace by pressing `<Enter>` or `<Ctrl + C>` key. Doing this will also exit `hello.exe`.
88
88
89
89
### NOTE
90
-
* Launching `hello.exe` via dotnet-trace will make its input/output to be redirected and you won't be able to interact with its stdin/stdout.
90
+
* Launching `hello.exe` via dotnet-trace will redirect its input/output and you will not be able to interact with it on the console by default. Use the --show-child-io switch to interact with its stdin/stdout.
91
91
92
92
* Exiting the tool via CTRL+C or SIGTERM will safely end both the tool and the child process.
thrownewInvalidOperationException($"Failed to start {ProcessLauncher.Launcher.ChildProc.ProcessName}.");
205
+
thrownewInvalidOperationException($"Failed to start '{ProcessLauncher.Launcher.ChildProc.StartInfo.FileName}{ProcessLauncher.Launcher.ChildProc.StartInfo.Arguments}'.");
0 commit comments