Problems registering a GameplayerDebuggerCategory?

Hi

I’m trying to make a gameplay debugger category following the instructions in GameplayDebugger.h (now the method at Gameplay Debugger | Unreal Engine Documentation is deprecated). I’ve made a subclass of FGameplayDebuggerCategory and added this to the module’s build script:

if (UEBuildConfiguration.bBuildDeveloperTools &&
    Target.Configuration != UnrealTargetConfiguration.Shipping &&
    Target.Configuration != UnrealTargetConfiguration.Test)
{
    PrivateDependencyModuleNames.Add("GameplayDebugger");
    PrivateDependencyModuleNames.Add("AIModule");
    Definitions.Add("WITH_GAMEPLAY_DEBUGGER=1");
}

And registered the category in the module’s startup function:

#if WITH_GAMEPLAY_DEBUGGER
	IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
	GameplayDebuggerModule.RegisterCategory("Custom", IGameplayDebugger::FOnGetCategory::CreateStatic(&FGameplayDebuggerCategory_Custom::MakeInstance), EGameplayDebuggerCategoryState::EnabledInGame, 5);
	GameplayDebuggerModule.NotifyCategoriesChanged();
#endif

UE_LOGs show the registration is definitely happening, but nothing appears when I enable gameplay debugging in PIE. What am I missing?

Thanks,
Chris

After building from source I worked it out - there is a note in the comments in GameplayDebugger.h:

// If you need to use old GameplayDebugger implementation, please set bEnableDeprecatedDebugger flag in GameplayDebugger.Build.cs

I ignored it - because I don’t want the old implementation. But bEnableDeprecatedDebugger is true by default!
Once I’d set it to false and rebuilt, the new rendering code was used and my category appeared.