diff --git a/Documentation/guides/tracing.md b/Documentation/guides/tracing.md index 830e4c03721..3f41798caca 100644 --- a/Documentation/guides/tracing.md +++ b/Documentation/guides/tracing.md @@ -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. @@ -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 +``` + 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`.