mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
fix: Forcefully load stacktrace if assert UI is shown (#2164)
- Add DiagnosticUtil to automatically filter out the "boring" stack entries. Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
This commit is contained in:
parent
a656fefb2b
commit
bed591d890
2 changed files with 36 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ internal class AssertHandler : IDisposable
|
|||
if (!this.ShowAsserts && !this.everShownAssertThisSession)
|
||||
return;
|
||||
|
||||
Lazy<string> stackTrace = new(() => new StackTrace(3).ToString());
|
||||
Lazy<string> stackTrace = new(() => DiagnosticUtil.GetUsefulTrace(new StackTrace()).ToString());
|
||||
|
||||
if (!this.EnableVerboseLogging)
|
||||
{
|
||||
|
|
@ -133,6 +133,9 @@ internal class AssertHandler : IDisposable
|
|||
return $"https://github.com/{userName}/{repoName}/blob/{branch}/{fileName}#L{line}";
|
||||
}
|
||||
|
||||
// grab the stack trace now that we've decided to show UI.
|
||||
_ = stackTrace.Value;
|
||||
|
||||
var gitHubUrl = GetRepoUrl();
|
||||
var showOnGitHubButton = new TaskDialogButton
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue