chore: replace IsDebugging check on PluginInterface with Debugger.IsAttached

Makes a bit more sense api-wise
This commit is contained in:
goat 2022-04-25 23:39:59 +02:00
parent 96ed22534c
commit c901ab4248
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@ -138,11 +139,7 @@ namespace Dalamud.Plugin
/// <summary>
/// Gets a value indicating whether Dalamud is running in Debug mode or the /xldev menu is open. This can occur on release builds.
/// </summary>
#if DEBUG
public bool IsDebugging => true;
#else
public bool IsDebugging => Service<DalamudInterface>.GetNullable() is {IsDevMenuOpen: true}; // Can be null during boot
#endif
public bool IsDebugging => Debugger.IsAttached;
/// <summary>
/// Gets the current UI language in two-letter iso format.