I created a new .NET Core Web Application from Visual Studio and I got this piece of code generated in startup class:
if (env.IsDevelopment()) { // ***