From 0ee274af740d78199473f41fad83bf4d0ec68500 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 4 Sep 2024 19:19:06 +0100 Subject: [PATCH] Update Trace dos with OSX instructions --- Documentation/guides/tracing.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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`.