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

Update Trace dos with OSX instructions #9284

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Documentation/guides/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ dotnet restore foo.csproj
dotnet trace collect --format speedscope -- dotnet build -bl --no-restore foo.csproj
```

On MacOS (and possibly linux) you need to pass `-p:UseSharedCompilation=false` otherwise the trace will hang.

```dotnetcli
dotnet restore foo.csproj
dotnet trace collect --format speedscope -- dotnet build -bl --no-restore foo.csproj -p:UseSharedCompilation=false
```

This should result in `.speedscope` and `.nettrace` files in the
current directory.

Expand All @@ -319,6 +326,13 @@ dotnet build foo.csproj
dotnet trace collect --format speedscope -- dotnet build "-t:Run" -bl --no-restore foo.csproj
```

On MacOS (and possibly linux) you need to pass `-p:UseSharedCompilation=false` otherwise the trace will hang.

```dotnetcli
dotnet restore foo.csproj
dotnet trace collect --format speedscope -- dotnet build "-t:Run" -bl --no-restore foo.csproj -p:UseSharedCompilation=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the -p:UseSharedCompilation=false works, do we not need the quotes around "-t:Run" anymore? Maybe that was a bug fixed at some point?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quotes for -t:Run never should have been needed. You'd need quotes if you wanted to specify multiple ;-separated targets, e.g. "-t:Restore;Run".

Now, it might be handy to have quotes anyway to make editing the command-line easier…. but as-is, the quotes here are not needed, and never were.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…but then there's the subsequent paragraph, doh:

found that " is necessary when : characters are present in the command. This appears to be some kind of argument parsing issue with dotnet trace.

So maybe the double-quotes are needed.

```

I found that `"` is necessary when `:` characters are present in the
command. This appears to be some kind of argument parsing issue with
`dotnet trace`.
Loading