I was trying to use the CsvProfiler with all categories disabled at start then enable specific ones with a config file or the command line parameter “csvCategories=”.
I found the command line parameter “csvAllCategoriesDisabled” that was supposed to do exactly what I needed, since it changes the value of “GAllCategoriesStartDisabled”.
But it doesn’t work with “csvCategories=” because “GCsvCategoriesEnabled” is Memzeroed after all the command line parameters are handled in the “Init” function.
While the config file is correctly read after the Memzero, there is an early return in the “UpdateCategoryFromConfig” function if “GAllCategoriesStartDisabled” is set to true. This effectively prevents any category in “CategoriesEnabledInConfig” from being enabled.
Unfortunately, the behavior you’re seeing is intended.
This switch was added as a debugging tool to disable everything, hence it also skips the later config override.
Here’s the relevant line from the commit: “Add -csvAllCategoriesDisabled and -csvTestCategoryOnly disable all categories and enable just the CsvTest category respectively. These even disable the global category. This is useful for debugging”.
I’ve submitted a change which should help with this. CL 46412919 in //UE5/Main
For context, the -csvAllCategoriesDisabled commandline option was intended for performance testing the CSV profiler itself. But it’s reasonable that specifying specific -csvCategories should work. That is fixed with my change.
If you want to set specific categories via an ini file, you can do that in DefaultEngine.ini like this:
[CsvProfiler]
+EnabledCategories=Audio
+EnabledCategories=Audio_Metasound
+DisabledCategories=Chaos
Wildcards are also possible there, although +DisabledCategories=* doesn’t work as you might expect, since enabling is applied before disabling in UpdateCategoryFromConfig. I’ve fixed that in the change mentioned too.
Note though that +DisabledCategories=* will also disable the GLOBAL and EXCLUSIVE categories, so you’ll need to enable these if you need them.