Add a custom build configuration

Is it possible to add additional custom build configurations?
For example: we have Debug, Development, Shipping, etc. I would like to add some custom build configurations with custom pre-processor directives.
I don’t want to create the build configuration inside visual studio as it will be overwritten when the solution is regenerated.

You can add your own custom pre-processor directives in your build.cs files. I would not create a custom build configuration due to the amount of code that relies on the existing ones.

But what about copying an existing build configuration, edit the name and add my preprocesor directives? The engine code wont be affected at all.
The problem is that I dont know where to start.

So you would like to start with ‘Shipping’ for example and then make your own ‘ShippingCustom’ one? Bare in mind that the engine does not use VS by itself, it comes with a ton of tools to build itself (UBT). All those tools expect that the configurations are those we have atm. So you might just want to search for ‘Shipping’ on the whole code base so you get an idea of where it is used and the amount of time you need to add a new configuration.

It’s not the build configuration name itself what is used in engine code but the pre-processor directives, lib directories, include directories, etc.
So if you copy the build configuration with another name and mantain all the directories, directives, commands and configurations then it would have to work just fine.
For example Shipping will have the directive UE_SHIPPING=1, ShippingCustom would have both UE_SHIPPING=1 and a custom one, for example: UE_SHIPPINGCUSTOM=1, and the rest of the settings untouched.

I know that the configuration will just yield into a define but there might be more than meets the eye. The only advice I can give you is to check all places because you might have to copy&paste a ton of code within UBT I’m afraid.

I can confirm that simply copying the existing build configs and changing parameter does not work.

I need to launch DevelopmentEditor in standalone mode. That is possible by adding -game to the commandline arguments. But the parameter is not taken into account on the copied config.