<p>I was getting bad data from an application I was writting using C++ in Visual Studio 2k3 so I decided to debug it. Then I found it was throwing an exception but one I can't track down.</p>

<p>Then I placed some try/catch blocks and low and behold, when I don't debug there is no exception. That is, I have code that looks like this:</p>

<p><code><pre>
std::vector&lt;MyClass*&gt; ListOfStuff;
.
.
.
try
{
.
.
.
   const MyClass * localPointer = ListOfStuff[i]; //This is where the exception occurs
.
.
}
 catch (...)
{
   int x = 0;  //place break here
}
</pre></code>
So if I step through the code line by line I'll get an exception and shot to the catch. But if I just let it run with a breakpoint inside the catch nothing happens. Using an iterator has the same behavior. And I can successfully check the size of the vector so I know I'm within the bounds.
<br>
Can anyone tell me what's going on? If it matters I'm using some standard windows libraries and openGL.</p>

Is the exception an ASSERT? These may get compiled out at compile time or otherwise throw an assertion.
For example, you could have
```
```
#ifdef DEBUG
#define ASSERT(cond) if (cond) throw CDebugAssertionObj;
#else
#define ASSERT(cond)
#endif
```
```