Desktop - Debugger - Detector (Pro)
A debugger is a tool that can pause the game, read its memory, and change values. There are two kinds:
- A user-mode debugger is attached to your game only. Examples are Visual Studio, dnSpy, and x64dbg.
- A kernel-mode debugger is attached to the whole system. An example is WinDbg. It is rare on a player's computer.
This detector looks for both, so you can react.
This detector needs the Pro version.
Walkthrough: Protecting a desktop build.
Do you need to add it?
Most of the time, no. The predefined Anti-Cheat-Monitor prefab already includes it. The debugger detector sits in the Desktop Environment Cheating Detector prefab, together with the virtual environment detector.
If you use your own monitor prefab, drag the Desktop Environment Cheating Detector prefab onto the monitor in your prefab so it becomes a child.

The detector prefabs in Assets/GUPS/AntiCheat/Resources/Prefabs/Detectors.
The component is DesktopDebuggerDetector (namespace GUPS.AntiCheat.Detector.Desktop). It does not need a monitor.
Settings
On the detector

The DesktopDebuggerDetector in the Inspector, shown with the virtual environment detector.
- Is Active (
isActive, bool, default on): Turns the detector on or off. - Possibility Of False Positive User Mode (
possibilityOfFalsePositiveUserMode, float, range 0 to 1, default 0.05): How likely a user-mode find is a false alarm. - Possibility Of False Positive Kernel Mode (
possibilityOfFalsePositiveKernelMode, float, range 0 to 1, default 0.001): How likely a kernel-mode find is a false alarm. - Threat Rating User Mode (
threatRatingUserMode, uint, default 400): How much a user-mode find adds to the threat score of the Anti-Cheat Monitor. - Threat Rating Kernel Mode (
threatRatingKernelMode, uint, default 750): How much a kernel-mode find adds. It is higher, because such a debugger is a stronger sign. - On Cheating Detection Event (
OnCheatingDetectionEvent): Your own reactions. Assign a method here. - Check Only On Game Start (
CheckOnlyOnGameStart, bool, default off): On means it checks once. Off means it checks again and again. Leave it off, because a debugger can be attached at any time. - Recheck Interval For Possible Cheating (
RecheckIntervalForPossibleCheating, float, range 0.1 to 600, default 5): Seconds between two checks.
In the project settings
Open Edit > Project Settings > GuardingPearSoftware > AntiCheat. Select the Desktop tab and go to Desktop - Debugger - Settings.

The debugger settings.
- Detect user-mode debugger (
Desktop_DetectUserModeDebugger, default on): Looks for a debugger attached to the game. - Detect kernel-mode debugger (
Desktop_DetectKernelModeDebugger, default on): Looks for a debugger attached to the whole system. It only reports on Windows for now. - Report managed-only debugger (
Desktop_Debugger_ReportManagedOnly, default on): A managed debugger is one for C# code, such as the one in Visual Studio. On means a find is also reported when only that C# debugger is seen. This option shows only while Detect user-mode debugger is on.
What it reports
When a debugger is found, the detector sends a DesktopCheatingDetectionStatus:
public struct DesktopCheatingDetectionStatus : IDesktopCheatingDetectionStatus
{
// How likely this find is a false alarm, from 0 to 1.
public float PossibilityOfFalsePositive { get; }
// How much this find adds to the threat score.
public uint ThreatRating { get; }
// What kind of debugger was found.
public EDesktopCheatingType DesktopCheatingType { get; }
// A short text that says what was found.
public string Evidence { get; }
}
DesktopCheatingType is one of these:
DEBUGGER_USER_MODE = 20, // A debugger is attached to the game.
DEBUGGER_KERNEL_MODE = 21 // A debugger is attached to the whole system.
Good to know
- The detector checks when the game starts, and again on the interval. You can also check yourself with
ManualScan(). - Each kind is reported once per session. The threat score does not climb on every repeat check.
PossibleCheatingDetectedstays true after the first find.- A find adds its threat rating to the threat score. A higher false-alarm chance makes it add less.
- The predefined monitor prefab has no punisher. A find only raises the threat score until you react yourself or add a punisher.
Platforms and requirements
- Windows, macOS, and Linux standalone builds.
- A user-mode debugger is found on all three. A kernel-mode debugger is found on Windows only.
- No extra plugin is needed.
Note
The detector skips the Unity Editor and development builds. Turn on Verify development builds on the Desktop tab to run it there too. Keep in mind that the Editor itself looks like a debugger, so the detector then reports while you work.
React to a find
In the Inspector. Add a method to On Cheating Detection Event. It runs when a debugger is found.
In code. Ask the detector:
var detector = AntiCheatMonitor.Instance.GetDetector<DesktopDebuggerDetector>();
if (detector != null && detector.PossibleCheatingDetected)
{
// A debugger was found.
}
Or listen, so your code runs at the moment of the find:
using System;
using GUPS.AntiCheat;
using GUPS.AntiCheat.Core.Detector;
using GUPS.AntiCheat.Detector.Desktop;
using UnityEngine;
public class DebuggerLogger : MonoBehaviour, IObserver<IDetectorStatus>
{
private void Start()
{
var detector = AntiCheatMonitor.Instance.GetDetector<DesktopDebuggerDetector>();
detector.Subscribe(this);
}
public void OnNext(IDetectorStatus status)
{
if (status is DesktopCheatingDetectionStatus desktopStatus)
{
Debug.LogWarning($"Debugger found: {desktopStatus.DesktopCheatingType} ({desktopStatus.Evidence})");
}
}
public void OnError(Exception error) { }
public void OnCompleted() { }
}
Back to the Detector overview.