Do not break during debugging
<p>This question seems very similar to <a href="https://stackoverflow.com/q/35484679/1997232">previous</a>, but the case is a bit different (perhaps better demonstrating the problem), though goal is the same.</p>
<p>xaml:</p>
<pre><code>&lt;TextBox Text=&quot;{local:ExceptionBinding Path=Color1}&quot; /&gt;
</code></pre>
<p>cs:</p>
<pre><code>public class ExceptionBinding : Binding
{
    public ExceptionBinding()
    {
        ValidationRules.Add(new ExceptionValidationRule());
    }
}
</code></pre>
<p>vm:</p>
<pre><code>    Color _color1;
    public string Color1
    {
        get { return (new ColorConverter()).ConvertToString(_color1); }
        set { _color1 = (Color)ColorConverter.ConvertFromString(value); }
    }
</code></pre>
<p>When this code runs standalone, for input <em><code>123</code></em> red border is shown around <code>TextBox</code> (field value is not changing). Entering <em><code>red</code></em> or <em><code>#FF0000</code></em> will remove border and update field value.</p>
<p>Problem: when running program under Visual Studio, entering <em><code>123</code></em> will throw at <code>ConvertFromString</code> (<a href="https://msdn.microsoft.com/en-us/library/ms606533(v=vs.110).aspx" rel="noreferrer">undocumented</a> btw):</p>
<blockquote>
<p>An exception of type 'System.FormatException' occurred in PresentationCore.dll but was not handled in user code</p>
<p>Additional information: Token is not valid.</p>
</blockquote>
<p><strong>How to prevent Visual Studio from interrupting program execution?</strong></p>