Dont 'Break on Exceptions' .. for a while

When debugging, I have an area of code that can generate multiple exceptions of an ‘out of bounds’ nature.
Thats OK… I have it wrapped in a try…catch

But when I have ‘break on exceptions’ turned on, it makes debugging a pain, because it stops on every one.
And if that happens in an activate event, sheesh… its never ending…

Is there a #pragma that says 'dont break on exceptions just for this bit’ ?

1 Like

#pragma BreakOnExceptions false

will do the job till the end of the method

And if you want to have again the break for other exceptions after in the same method you can add
#pragma BreakOnExceptions auto
where you you need

The auto option will follow the ‘break on exceptions’ status

I usually use this for the same situation where there can be an exception that you know how to manage.
#pragma BreakOnExceptions false
try
///my known exception with relative catch…
end try
#pragma BreakOnExceptions auto