views:

90

answers:

3

I am using Delphi to create a program and need help with turning of the Delphi debugger. I create some code as follows:

try

... ... ...

except

...

unfortunately before moving to the except code the debugger kicks in with a un-user friendly message. How can switch it off and move directly to the except code?

+6  A: 

Put a breakpoint on the "try" line. Right-click on the red dot and open the breakpoint properties. Hit "Advanced," uncheck "Break" and check "Ignore subsequent exceptions." Then you'll probably want to put one inside the Except block with "Handle subsequent exceptions" checked, so you don't lose exception-debugging altogether.

Or, if you never want the debugger to break for that exception type, there's a checkbox on the debugger's exception handler dialog box to make it ignore that class in the future. (This setting can be changed later on under Tools->Options.)

Mason Wheeler
+2  A: 

The following article gives some details about how to turn those messages on/off.

http://pages.cs.wisc.edu/~rkennedy/exception-messages

Mark Wilkins
+1  A: 

In the debugger options, you'll find a section called Language Exceptions. Uncheck the option to notify on language exceptions.

Bruce McGee
Be aware that if you do this, it will make it stop breaking on exceptions completely, which is one of the most useful features the debugger has to offer.
Mason Wheeler
I consider it a temporary setting, only to be used when you don't want the debugger notifying you of both trapped and untrapped exceptions.
Bruce McGee