Launch profiler from macOS terminal with sudo

Questions about YourKit .NET Profiler
Post Reply
ianbUK
Posts: 4
Joined: Sun Jan 15, 2023 3:29 pm

Launch profiler from macOS terminal with sudo

Post by ianbUK »

launching the profiler from the terminal in macOS as sudo, gets past the '(null) cannot' error, but the profiler just sits there with the 'connecting' dialog shown.

What do I need to do, to get profiling working on a Ventura macOS based M1 MacBook Air, with a .Net Framework 4.8 application?
ianbUK
Posts: 4
Joined: Sun Jan 15, 2023 3:29 pm

Re: Launch profiler from macOS terminal with sudo

Post by ianbUK »

The log file contains the following, does it help diagnose the problem?

Strategy 'desktop' failed: com.github.markusbernhardt.proxy.util.ProxyException: com.github.markusbernhardt.proxy.util.PListParser$XmlParseException: Failed to parse: dict
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Launch profiler from macOS terminal with sudo

Post by Vladimir Kondratyev »

1) Which exact profiler version are you using?

2) For what purpose are you lauching it with "sudo"?

3) Please send to [email protected] exact command you using to launch the profiler; full profiler log file; screnshot of profiler UI

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Ilya Kalikin
Posts: 16
Joined: Mon Jun 12, 2017 3:06 pm

Re: Launch profiler from macOS terminal with sudo

Post by Ilya Kalikin »

Hi. Instead of running profiler with sudo to get past Terminal error, you can enable profiling manually by setting few environment variables, please see this help topic.

The reason you can't connect to the application is that you try to profile an unsupported .NET runtime version. On macOS profiling of .NET Framework is not supported. Do you see your .NET Framework application in this application list? Can you please provide a link to the .NET Framework 4.8 runtime you use for macOS?
Adans23
Posts: 1
Joined: Wed Mar 29, 2023 8:55 am

Re: Launch profiler from macOS terminal with sudo

Post by Adans23 »

When running the YourKit profiler from a terminal with sudo, it is possible that the profiler cannot connect to the application being profiled due to permission issues. You can try: make sure the profiler and the app being profiled are running with the same permissions, make sure the profiler and the app being profiled are running in the same user context, make sure the profiled app is configured to allow profiling, try running the profiler without sudo
Post Reply