Breakpoints in engine code on startup

Not sure if this is a CPP issue or engine source issue, but on startup (when loading the editor after clicking debug in rider) my code is stopping execution until I resume at the line ExclusiveInternalFlags |= IsInAsyncLoadingThread() ? EInternalObjectFlags::None : EInternalObjectFlags::AsyncLoading;

UObject* StaticFindObjectFastSafe(UClass* ObjectClass, UObject* ObjectPackage, FName ObjectName, bool bExactClass, EObjectFlags ExclusiveFlags, EInternalObjectFlags ExclusiveInternalFlags)
{
    UObject* FoundObject = nullptr;

    if (!UE::IsSavingPackage(nullptr) && !IsGarbageCollectingAndLockingUObjectHashTables())
    {
        // We don't want to return any objects that are currently being background loaded unless we're using FindObject during async loading.
        ExclusiveInternalFlags |= IsInAsyncLoadingThread() ? EInternalObjectFlags::None : EInternalObjectFlags::AsyncLoading;
        FoundObject = StaticFindObjectFastInternal(ObjectClass, ObjectPackage, ObjectName, bExactClass, ExclusiveFlags, ExclusiveInternalFlags);
        if (!FoundObject)
        {
            FoundObject = StaticFindObjectWithChangedLegacyPath(ObjectClass, ObjectPackage, ObjectName, bExactClass);
        }
    }

    return FoundObject;
}

Going through the call stack, the calls originate from BuildCustomPropertyListForPostConstruction for DmgTypeBP_Environmental_C. I don’t use damage or damage types in my game.

1 Like

Ended up being a simple fix. Rider was failing to show me that I had set a manual breakpoint (must have been accidental) on that line. However, you can view all your breakpoints and exceptions by opening the debug panel and clicking the button that has two overlapping red circles. Then, you can set the breakpoints to be grouped by file. I skipped over any within my code and went to any in the engine code, and sure enough there was a breakpoint set there. Removing it fixed my problem.