You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Optional) Deploy an ASP.NET Core 3.0 app to the App Service
Open the Kudu site for your App Service in the Browser (Find "Advanced Tools" from the App in the Azure Portal)
Go to the Process Explorer and find the PID of your app (it's probably the w3wp.exe process)
Click on Debug Console and select Cmd
At the cmd prompt, type:
dotnet tool install --global dotnet-trace
There's a warning that the tools directory is not on the PATH. So run set PATH=%PATH%;%USERPROFILE%\.dotnet\tools
dotnet-trace collect --profile gc-verbose -p 4124 -o gc-verbose.netperf (substituting the PID from the earlier step for 4124)
Result:
[ERROR] System.IO.IOException: The handle is invalid
at System.ConsolePal.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.ConsolePal.Clear()
at Microsoft.Diagnostics.Tools.Trace.CollectCommandHandler.Collect(CancellationTo
ken ct, IConsole console, Int32 processId, FileInfo output, UInt32 buffersize, String providers, String profile, TraceFileFormat format, TimeSpan duration) in /_/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs:line 41
Expect:
Should be able to do a collection on Antares from the Kudu window.
It seems that any code that tries to manipulate the console directly won't work in Kudu (because there isn't really a console window; just redirected stdin/stdout/stderr)
Activity
pharring commentedon Nov 22, 2019
Interestingly:
dotnet-trace list-profilesworks.dotnet-trace -hfails.It seems that any code that tries to manipulate the console directly won't work in Kudu (because there isn't really a console window; just redirected stdin/stdout/stderr)
pharring commentedon Nov 24, 2019
See also dotnet/command-line-api#611
for fixing the "-h" option.
pharring commentedon Nov 25, 2019
#645 is the same issue.