如何理解 Visual Studio App Center 崩溃堆栈跟踪

问题描述 投票:0回答:1

最近我在我的 UWP 应用程序上设置了 Visual Studio App Center 的崩溃日志记录,该应用程序发布在 Microsoft Store 上。

我注意到我的应用程序在 App Center 的仪表板上崩溃了几次,但我不明白仪表板上显示的那些“堆栈跟踪”对我有何用处。它们不包含任何行号,因此我不知道错误在我的应用程序中的确切位置。

我还将我的应用程序的符号上传到 Visual Studio App Center。

以下是 Visual Studio App Center 仪表板崩溃的屏幕截图:

我能理解在

doLoginAsync
方法中抛出了异常,但是那个方法很复杂,我需要更多关于异常发生位置的细节。

如何从 Visual Studio App Center 的崩溃堆栈跟踪中了解问题的确切位置?

c# .net uwp crash visual-studio-app-center
1个回答
0
投票

一般情况下,您可以通过添加一些附件来自定义崩溃报告。这有助于使报告更具可读性。您可以使用 Crashes.GetErrorAttachments 将二进制和文本附件添加到崩溃报告中。

喜欢:

    Crashes.GetErrorAttachments = (ErrorReport report) =>
{
    // Your code goes here.
    return new ErrorAttachmentLog[]
    {
        ErrorAttachmentLog.AttachmentWithText("Hello world!", "hello.txt"),
        ErrorAttachmentLog.AttachmentWithBinary(Encoding.UTF8.GetBytes("Fake image"), "fake_image.jpeg", "image/jpeg")
    };
};

更多信息可以在这里找到:https://learn.microsoft.com/en-us/appcenter/sdk/crashes/uwp#add-attachments-to-a-crash-report

此外,应用中心团队正在他们的仪表板上提供支持。您可以直接在 App Center 网站上提交支持票。请检查:帮助和反馈

© www.soinside.com 2019 - 2024. All rights reserved.