Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: trino on March 29, 2013, 11:40:40 am

Title: Set codeblocks to ignore exceptions in debug
Post by: trino on March 29, 2013, 11:40:40 am
Hi all.

I have a try-catch block in my code and when I'm debugging and an exception is thrown in this block codeblocks stops there even if there's no breakpoint set for this block. Is there a way that I can set codeblocks debugger to ignore these exceptions and don't stop at them?


Thanks.
Title: Re: Set codeblocks to ignore exceptions in debug
Post by: Jenna on March 29, 2013, 11:53:09 am
The exact place in the settings depends on the version of C::B you use.

In any case you should give all needed information (as the forum rules say).

Nevertheless in the debuggersettings (submenu of "Settings"-menu) you find an option "Catch c++ exceptions", unchecking this option should do the trick.
Title: Re: Set codeblocks to ignore exceptions in debug
Post by: oBFusCATed on March 29, 2013, 01:05:12 pm
I have a try-catch block in my code and when I'm debugging and an exception is thrown in this block codeblocks stops there even if there's no breakpoint set for this block. Is there a way that I can set codeblocks debugger to ignore these exceptions and don't stop at them?
If you want fine grained control over which exceptions to be catched the answer is no it is not possible.
The reason is that the debugger we are using (GDB) doesn't have this feature. Currently the options is
on/off style only. Search their bug tracker and ask the GDB developers to increase the priority of this
feature.
Title: Re: Set codeblocks to ignore exceptions in debug
Post by: trino on March 29, 2013, 03:09:56 pm
@jens, sorry about not including the version of my codeblock. Anyway, I found the option you mentioned. Thanks!

@oBFusCATed for now it doesn't really matter the exception, I can ignore all of them in the debug, but it would be nice to have this feature.