I am writing a Java program using Eclipse Juno.
When I run the program, and it meets an exception, program just dies with back trace. I set these exception breakpoint to debug at time for any unexpected exceptions.
Exception
Throwable
Error
but, anyway, still I see some uncaught exceptions just makes program crashes instead of breaks by Eclipse. I want to break for any uncaught exceptions. But I can't find option to choose ALL exceptions. How can I make Eclipse to break on any exceptions?
Breakpoints To define a breakpoint in your source code, right-click in the left margin in the Java editor and select Toggle Breakpoint. Alternatively, you can double-click on this position. The Breakpoints view allows you to delete and deactivate Breakpoints and modify their properties.
You can fix this immediately by opening the Markers view and delete the Java Exception Breakpoints. However, to permanently remove this type of breakpoints, you have to go to the Java Debug options and uncheck the "Suspend excecution on uncaught exceptions" option.
Exception Breakpoint: This type of breakpoint is used to halt execution when a specified exception type is thrown at any time during execution. To set an exception breakpoint in Eclipse, use the "Run -> Add Java Exception Breakpoint..." menu item.
Finally I found it!
I had to explicitly set subclasses of this exception checkbox for each exception in Breakpoints pane.
Also, I need to set NullPointerException
's caught locations too or even uncaught exceptions won't be caught.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With