For anyone who is curious, editing VCToolChain.cs to force flags for compiler and linker is not the best idea, because the build properties used also through UBTfor other tasks.
On Windows, the generation of debug is forced via hardcoded property assignment in UEBuildWindows.cs in SetUpConfigurationEnvironment method. You can fix it there and it will respect BuildConfiguration.xml
// NOTE: Even when debug info is turned off, we currently force the linker to generate debug info
// anyway on Visual C++ platforms. This will cause a PDB file to be generated with symbols
// for most of the classes and function/method names, so that crashes still yield somewhat
// useful call stacks, even though compiler-generate debug info may be disabled. This gives
// us much of the build-time savings of fully-disabled debug info, without giving up call
// data completely.
GlobalLinkEnvironment.bCreateDebugInfo = true;
}
This thread helped me find the actual solution, right under the source code above it checks for a variable called bOmitPCDebugInfoInDevelopment on whether it should generate PDB files.