Author Topic: Set codeblocks to ignore exceptions in debug  (Read 10516 times)

Offline trino

  • Single posting newcomer
  • *
  • Posts: 4
Set codeblocks to ignore exceptions in debug
« 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Set codeblocks to ignore exceptions in debug
« Reply #1 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Set codeblocks to ignore exceptions in debug
« Reply #2 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline trino

  • Single posting newcomer
  • *
  • Posts: 4
Re: Set codeblocks to ignore exceptions in debug
« Reply #3 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.