-
Notifications
You must be signed in to change notification settings - Fork 547
[msbuild] Compute DOTNET_DiagnosticPorts using MSBuild properties. #23429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #b3590d7] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 43 tests failed, 34 tests passed. Failures❌ dotnettests tests (iOS)
Html Report (VSDrops) Download ❌ dotnettests tests (MacCatalyst)
Html Report (VSDrops) Download ❌ dotnettests tests (macOS)
Html Report (VSDrops) Download ❌ dotnettests tests (Multiple platforms)
Html Report (VSDrops) Download ❌ framework tests
Html Report (VSDrops) Download ❌ fsharp tests
Html Report (VSDrops) Download ❌ interdependent-binding-projects tests
Html Report (VSDrops) Download ❌ introspection tests
|
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #b235d76] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 41 tests failed, 36 tests passed. Failures❌ dotnettests tests (MacCatalyst)
Html Report (VSDrops) Download ❌ dotnettests tests (macOS)
Html Report (VSDrops) Download ❌ dotnettests tests (Multiple platforms)
Html Report (VSDrops) Download ❌ framework tests
Html Report (VSDrops) Download ❌ fsharp tests
Html Report (VSDrops) Download ❌ interdependent-binding-projects tests
Html Report (VSDrops) Download ❌ introspection tests
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #06a3fb5] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #06a3fb5] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #06a3fb5] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #06a3fb5] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #06a3fb5] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #06a3fb5] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #06a3fb5] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🚀 [CI Build #06a3fb5] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 115 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
…ild 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 <jonathan.peppers@microsoft.com>
Context: dotnet/android#10351 Context: dotnet/macios#23429 We are adding new MSBuild properties to simplify setting `$DOTNET_DiagnosticPorts` on mobile: * `$(DiagnosticAddress)` * `$(DiagnosticPort)` * `$(DiagnosticSuspend)` * `$(DiagnosticListenMode)` * `$(DiagnosticConfiguration)` if you want to specify the full value yourself, escape `,` with `%2c`, etc. We will ship these properties in future releases of .NET 9 and 10. To improve `dsrouter` the current log message: Start an application on android device with ONE of the following environment variables set: [Default Tracing] DOTNET_DiagnosticPorts=127.0.0.1:9000,nosuspend,connect [Startup Tracing] DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend,connect Will change to: Build and run an Android application such as: [Default Tracing] dotnet build -t:Run -c Release -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=connect [Startup Tracing] dotnet build -t:Run -c Release -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=true -p:DiagnosticListenMode=connect Note that `dotnet run` *does work*, but it doesn't show good progress on the build & deploy steps as compared to `dotnet build -t:Run` and MSBuild's terminal logger. It can take several seconds to run a `Release` build. I think it's better to recommend `-t:Run` until we improve `dotnet run`.
If you run
dotnet-dsrouter ios, it says:Setting
$DOTNET_DiagnosticPortsis 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:
Since these are all default values, it can be simplified to:
Setting any of the new properties also implicitly means that
$(EnableDiagnostics)is set totrue(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