Skip to content
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

[Tracing]: Command 127.0.0.1:<port>,suspend,listen is broken for the release build #21530

Closed
JaneySprings opened this issue Oct 25, 2024 · 3 comments

Comments

@JaneySprings
Copy link

Apple platform

iOS

Framework version

net8.0-*

Affected platform version

dotnet 8.0.403

Description

Hi! I'm a creator of .NET Meteor extension for VSCode. It has a profiler feature for .NET apps. I have an issue with profiling in the release configuration. It seems like it was broken recently. Profiling (dotnet-trace) works perfectly for the Debug build.

Application isn't hangs and doesn't wait for the profiler in Release build (even if -p:MtouchProfiling=true specified).
It seems like libmono-component-diagnostics_tracing-static.a library doesn't include in the app bundle.

Steps to Reproduce

  1. Build with dotnet build app.csproj -p:Configuration=Release -p:TargetFramework=net8.0-ios -p:RuntimeIdentifier=ios-arm64 -p:MtouchProfiling=true
  2. Run dsrouter with --forward-port iOS
  3. Install app with mlaunch
  4. Run app with mlaunch and pass env --setenv=DOTNET_DiagnosticPorts=127.0.0.1:9000,suspend,listen

Did you find any workaround?

no

Build logs

msbuild.binlog.zip

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8303/tools/bin/mlaunch

WARNING: dotnet-dsrouter is a development tool not intended for production environments.

info: dotnet-dsrouter-21044[0]
Starting dotnet-dsrouter using pid=21044
info: dotnet-dsrouter-21044[0]
Starting IPC server (/Users/nromanov/ios-port.lock) <--> TCP client (127.0.0.1:9000) router.
info: dotnet-dsrouter-21044[0]
Successfully connected new device, id=1.

2024-10-25 23:19:31.338 mlaunch[21045:189563] Requested but did not find extension point with identifier Xcode.IDEDebugger.VariablesViewQuickLookProvider for extension Xcode.SpriteKit.GKStateMachineQuickLookProvider of plug-in com.apple.IDESpriteKitParticleEditor
...
Installing application bundle 'com.companyname.rmaui' on 'MyIPhoneX'
Application bundle 'com.companyname.rmaui' installed on 'MyIPhoneX'
2024-10-25 23:19:39.143 mlaunch[21050:189654] Requested but did not find extension point with identifier Xcode.IDEPlaygroundsKit.PlaygroundBottomBarExecutionAdaptor for extension Xcode.IDEPlaygroundEditor.IDEPlaygroundBottomBarExecutionAdaptor of plug-in com.apple.dt.IDEPlaygroundEditorPlugin
...
Launched application 'com.companyname.rmaui' on 'MyIPhoneX' with pid 60985
2024-10-25 23:19:40.279 RadioMaui[60985:17008407] You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.

@rolfbjarne
Copy link
Member

I don't think this has ever worked in .NET, for Release mode you need to set MtouchDebug=true in order to make profiling work.

We have an issue to make MtouchProfiling (or a similar property name) work, but it hasn't been implemented yet: #19370

@rolfbjarne
Copy link
Member

Closing as duplicate of #19370.

@rolfbjarne rolfbjarne closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
@JaneySprings
Copy link
Author

Yeah, MtouchDebug=true instead of MtouchProfiling=true works. Thank you, @rolfbjarne !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants