ContentBrowser.Debug.CrumbsEnumerate
ContentBrowser.Debug.CrumbsEnumerate
#Overview
name: ContentBrowser.Debug.CrumbsEnumerate
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enumerate crumbs
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ContentBrowser.Debug.CrumbsEnumerate
is to control the enumeration of crumbs in the Content Browser for debugging purposes. It is primarily used in the Content Browser subsystem of Unreal Engine’s editor.
This setting variable is utilized in the Content Browser module, specifically within the SContentBrowser
class. Based on the callsites, it’s clear that this variable is part of the debugging toolset for the Content Browser’s path navigation system (crumbs).
The value of this variable is set using an FAutoConsoleVariableRef
, which means it can be changed at runtime through console commands. By default, it is set to true
.
The associated boolean variable bCrumbsEnumerate
directly interacts with ContentBrowser.Debug.CrumbsEnumerate
. They share the same value, with bCrumbsEnumerate
being used in the actual code logic.
Developers must be aware that this variable is intended for debugging purposes. When set to false
, it prevents the enumeration of crumbs, which can be useful when trying to debug issues related to the Content Browser’s path navigation without triggering breakpoints on every tick.
Best practices when using this variable include:
- Use it temporarily for debugging and remember to re-enable it when done.
- Be cautious when disabling it in production builds, as it may affect the Content Browser’s functionality.
- Consider the performance implications when enabling/disabling this feature, especially in large projects with complex folder structures.
Regarding the associated variable bCrumbsEnumerate
:
The purpose of bCrumbsEnumerate
is to provide a quick access point in the code for the ContentBrowser.Debug.CrumbsEnumerate
setting. It is used directly in the Content Browser’s logic to determine whether to enumerate crumbs.
This variable is used in the Content Browser module, specifically within the SContentBrowser
class methods.
The value of bCrumbsEnumerate
is set by the FAutoConsoleVariableRef
associated with ContentBrowser.Debug.CrumbsEnumerate
.
It interacts directly with the ContentBrowser.Debug.CrumbsEnumerate
console variable and is used in conditional statements to control the enumeration of sub-items in the Content Browser.
Developers should be aware that changes to ContentBrowser.Debug.CrumbsEnumerate
will directly affect the behavior of code sections that check bCrumbsEnumerate
.
Best practices for bCrumbsEnumerate
include:
- Treat it as read-only in most cases, as its value is controlled by the console variable.
- Use it for conditional checks in performance-sensitive areas of the Content Browser code.
- Consider wrapping uses of this variable in
#if WITH_EDITOR
blocks if used in runtime code, as it’s primarily for editor debugging.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SContentBrowser.cpp:168
Scope (from outer to inner):
file
namespace ContentBrowser
Source code excerpt:
// It is useful when debugging enumeration issues to shut this system off so that breakpoints set will not be triggered every tick
bool bCrumbsEnumerate = true;
FAutoConsoleVariableRef CrumbsEnumerateCVar(TEXT("ContentBrowser.Debug.CrumbsEnumerate"), bCrumbsEnumerate, TEXT("Enumerate crumbs"), ECVF_Default);
const FContentBrowserInstanceConfig* GetConstInstanceConfig(FName ForInstance)
{
if (ForInstance.IsNone())
{
return nullptr;
#Associated Variable and Callsites
This variable is associated with another variable named bCrumbsEnumerate
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SContentBrowser.cpp:167
Scope (from outer to inner):
file
namespace ContentBrowser
Source code excerpt:
{
// It is useful when debugging enumeration issues to shut this system off so that breakpoints set will not be triggered every tick
bool bCrumbsEnumerate = true;
FAutoConsoleVariableRef CrumbsEnumerateCVar(TEXT("ContentBrowser.Debug.CrumbsEnumerate"), bCrumbsEnumerate, TEXT("Enumerate crumbs"), ECVF_Default);
const FContentBrowserInstanceConfig* GetConstInstanceConfig(FName ForInstance)
{
if (ForInstance.IsNone())
{
return nullptr;
#Loc: <Workspace>/Engine/Source/Editor/ContentBrowser/Private/SContentBrowser.cpp:2650
Scope (from outer to inner):
file
function bool SContentBrowser::OnHasCrumbDelimiterContent
Source code excerpt:
bool bHasSubItems = false;
if (ContentBrowser::bCrumbsEnumerate)
{
ContentBrowserData->EnumerateItemsUnderPath(*CrumbData, SubItemsFilter, [&bHasSubItems](FContentBrowserItemData&& InSubItem)
{
bHasSubItems = true;
return false;
});