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
[release/9.0.1xx] [msbuild] Compute DOTNET_DiagnosticPorts using MSBuild properties. (#23629)
If you run `dotnet-dsrouter ios`, it says:
Start an application on ios device with ONE of the following environment variables set:
[Default Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,nosuspend,listen
[Startup Tracing]
DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend,listen
Setting `$DOTNET_DiagnosticPorts` is non-trivial, so as a step to simplify this, we are adding multiple MSBuild properties to configure this value.
This would allow the log message to say:
Build and run an iOS application such as:
[Default Tracing]
dotnet run -c Release -p:ios-arm64 -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
[Startup Tracing]
dotnet run -c Release -p:ios-arm64 -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=true -p:DiagnosticListenMode=listen
Since these are all default values, it can be simplified to:
Build and run an iOS application such as:
[Default Tracing]
dotnet run -p:ios-arm64 -c Release -p:EnableDiagnostics=true
[Startup Tracing]
dotnet run -p:ios-arm64 -c Release -p:EnableDiagnostics=true
Setting any of the new properties also implicitly means that `$(EnableDiagnostics)` is set to `true` (first example), or alternatively `$(EnableDiagnostics)` can be set to true to get the default value for all the new properties (second example).
Ref: dotnet/android#10351
Backport of #23429.
---------
Co-authored-by: Jonathan Peppers <[email protected]>
Copy file name to clipboardExpand all lines: msbuild/Xamarin.Shared/Xamarin.Shared.props
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -237,7 +237,20 @@ Copyright (C) 2020 Microsoft. All rights reserved.
237
237
<!-- that also encapsulates whether we're a library or not (this makes conditions simpler) -->
238
238
<_BundleOriginalResourcesCondition="'$(OutputType)' == 'Library' And '$(IsAppExtension)' != 'true' And '$(BundleOriginalResources)' == 'true'">true</_BundleOriginalResources>
239
239
240
-
<EnableDiagnosticsCondition="'$(EnableDiagnostics)' == '' And '$(_BundlerDebug)' == 'true'">true</EnableDiagnostics>
240
+
<EnableDiagnosticsCondition="'$(EnableDiagnostics)' == '' And ('$(DiagnosticConfiguration)' != '' Or '$(DiagnosticAddress)' != '' Or '$(DiagnosticPort)' != '' Or '$(DiagnosticSuspend)' != '' Or '$(DiagnosticListenMode)' != '')">true</EnableDiagnostics>
241
+
</PropertyGroup>
242
+
243
+
<PropertyGroupCondition="'$(EnableDiagnostics)' == 'true' And '$(DiagnosticConfiguration)' == ''">
0 commit comments