Commit 71de7f1
authored
[ProcessLauncher] Explicitly set diagnostic port configs (#5503)
Partly addresses #5501
Child processes started by diagnostic tooling set a
`DOTNET_DiagnosticPort` environment variable, specifying only the path.
The runtime [defaults to a connect type port in suspend
mode](https://github.com/dotnet/runtime/blob/22ccb0563cbb79e950b8d8e2d8bed306b125e7d8/src/native/eventpipe/ds-ipc.c#L628-L637),
which isn't clear from the end user's viewpoint, as [logging will only
reveal the DiagnosticPort
value](https://github.com/dotnet/runtime/blob/22ccb0563cbb79e950b8d8e2d8bed306b125e7d8/src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h#L390-L412).
Instead, we can mitigate confusion by explicitly setting the config from
the tooling side.
### Before
```
The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port.
DOTNET_DiagnosticPorts="dotnet-trace-48696-20250614_161420.socket"
DOTNET_DefaultDiagnosticPortSuspend=0
```
### Now
```
The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port.
DOTNET_DiagnosticPorts="dotnet-trace-29004-20250616_134924.socket,suspend,connect"
DOTNET_DefaultDiagnosticPortSuspend=0
```1 parent f391d8d commit 71de7f1
File tree
1 file changed
+1
-1
lines changed- src/Tools/Common/ReversedServerHelpers
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments