Is there any way to disable Delphi’s "Debugger Exception Notification"?

Asked

Viewed 5,558 times

4

I would like to disable the function from which Debugger notifies me of an Exception in a code snippet.

Example:

try
   Text := CurrToStrF('Erro', ffNumber, 2);
except
   Text := '0,00';
end;

During the above code debugging sometimes the exception is launched and the debugging pauses displaying a message on the screen.

However, as I know he will be making the exception, I wanted Delphi to ignore the exceptions only in that part.

Is there a directive (or other means) that warned the debugger not to stop?

I’m using Delphi 2009

  • 2

    What version of delphi you’re using?

  • The version used is Delphi 2009

2 answers

4

Answer:

Yes, there’s a way to disable it.

Explanation:

Delphi 7 - In the top menu, click Tools-Debugger Options open a window, navigate to the tab Language Exceptions and you’ll see a checkbox saying [ ] Stop on delphi exceptions mark it, ready.

Delphi XE5 - In the top menu, click Tools-Options open a window, browse the list on the left, down at the end you will find Debugger Options click on the flower to open it so you will find Language Exceptions, Then you’ll get the checkbox down there written Notify on language exceptions, just clear it and that’s it.

Obs: I deduced that you use the version 7 or the XE5 of Delphi, as they are currently the most used, if the version of your Delphi is not 7 nor the XE5, let me know as I will find the solution for your version by editing this answer.

  • 2

    +1. However it would be nice even if he spoke the version, I am using the 2006 and in my IDE the name is "Notify on language exceptions". But just change it, I don’t think he’s gonna have a problem.

  • In fact I don’t want all exceptions to be ignored, or all exceptions to be ignored ( checking the checkbox in the message sent by the debugger ) I only wish that in that piece of code the debugger does not stop.

3


It is possible yes.

Put a Breakpoint at the point from which you do not want the debugger to notify you of new exceptions.

Right-click on it and select Breakpoint properties click on Advanced weaning Break and mark Ignore subsequent exceptions.

Then put a Breakpoint at the point you want the debugger to re-notify exceptions.

Right-click on it and select Breakpoint properties click on Advanced weaning Break and mark Handle subsequent exceptions.

After that when debugging the debugger will not notify you of any exception occurring in that snippet.

But when you close the project Breakpoints will be lost, to avoid this you must enable auto save of the project desktop.

To do this you must go up Tools->Options in Environment options there look for Auto save and mark Project desktop or Project workspace.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.