ASP.Net Core is not throwing an Exception when running in Debug Mode
<p>I am using Visual Studio 2015 Update 3 and ASP.NET Core.  One of the APIs (Account) depend on a cache service that uses Redis. </p>

<pre><code>public AccountController(Cache.Contracts.ICacheManager cacheManager)
{
     _cacheManager = cacheManager;
}
</code></pre>

<p>When Redis is not running, the api/account should not work since Cache Service should make a connection to Redis.</p>

<p>In the startup class:</p>

<pre><code> public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
 {      
     loggerFactory.AddConsole();
     loggerFactory.AddDebug();
 }
</code></pre>

<p>When requesting the api/account </p>

<p><strong>Running the project from Visual studio</strong></p>

<p>It gives the following:</p>

<pre><code>The localhost page isn’t working

localhost is currently unable to handle this request.
</code></pre>

<p><strong>When running from powershell by</strong> using <code>dotnet run</code>:</p>

<p><a href="https://i.stack.imgur.com/GOfmM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GOfmM.png" alt="enter image description here"></a></p>

<p>This is also the Exception Settings</p>

<p><a href="https://i.stack.imgur.com/S5yhK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S5yhK.png" alt="enter image description here"></a></p>

<p><strong>Question</strong></p>

<p>Why errors are not thrown in Visual Studio case? I need to know what errors are causing my application to break.</p>