diff --git a/Dalamud.Boot/veh.cpp b/Dalamud.Boot/veh.cpp
index 6c951f93d9..85d58eb9d5 100644
--- a/Dalamud.Boot/veh.cpp
+++ b/Dalamud.Boot/veh.cpp
@@ -249,6 +249,12 @@ LONG WINAPI vectored_exception_handler(EXCEPTION_POINTERS* ex)
{
// pass
}
+ else if (ex->ExceptionRecord->ExceptionCode == 0x406D1388)
+ {
+ // VS thread namer - just let these run; they aren't a problem.
+ // https://learn.microsoft.com/en-us/visualstudio/debugger/tips-for-debugging-threads
+ return EXCEPTION_CONTINUE_EXECUTION;
+ }
else
{
if (!is_whitelist_exception(ex->ExceptionRecord->ExceptionCode))
diff --git a/Dalamud/Game/Internal/AntiDebug.cs b/Dalamud/Game/Internal/AntiDebug.cs
index 1b0a62a156..dfc6bde905 100644
--- a/Dalamud/Game/Internal/AntiDebug.cs
+++ b/Dalamud/Game/Internal/AntiDebug.cs
@@ -13,8 +13,8 @@ namespace Dalamud.Game.Internal;
[ServiceManager.EarlyLoadedService]
internal sealed class AntiDebug : IInternalDisposableService
{
- private readonly byte[] nop = new byte[] { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 };
- private byte[] original;
+ private readonly byte[] nop = [0x31, 0xC0, 0x90, 0x90, 0x90, 0x90];
+ private byte[]? original;
private IntPtr debugCheckAddress;
[ServiceManager.ServiceConstructor]
@@ -44,8 +44,8 @@ private AntiDebug(TargetSigScanner sigScanner)
}
/// Finalizes an instance of the class.
- ~AntiDebug() => this.Disable();
-
+ ~AntiDebug() => ((IInternalDisposableService)this).DisposeService();
+
///
/// Gets a value indicating whether the anti-debugging is enabled.
///