Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Assertion Error Breakpoint(Eclipse failing to break at assertion error)
Assertion Error Breakpoint [message #949012] Thu, 18 October 2012 15:45 Go to next message
Peter Rimshnick is currently offline Peter RimshnickFriend
Messages: 4
Registered: September 2012
Junior Member
Hi. For some reason, Eclipse (Juno) does not suspend when assertion errors are thrown, even though I added the appropriate assertion breakpoint. In one of my older versions of Eclipse, oddly enough the debugger would suspend at assertion errors even if I didn't explicitly add a breakpoint. Now it doesn't suspend even if I have one. Any ideas? Thanks!
Re: Assertion Error Breakpoint [message #995361 is a reply to message #949012] Sat, 29 December 2012 21:46 Go to previous message
Jonathan Aldrich is currently offline Jonathan AldrichFriend
Messages: 1
Registered: December 2012
Junior Member
I was able to get Eclipse JDT to suspend by setting an exception breakpoint on java.lang.AssertionError. But I have to say that I find Eclipse's default settings for assertions to be strange. It would be nice if by default:

(A) Assertions were checked in debug mode

(B) An assertion failure suspended execution

Does anyone know why Eclipse does not do the above by default? It makes assertions less useful if the tools don't support them well.

Even if there is a good reason for the default, it would be quite helpful if there were a project-wide or IDE-wide setting to enable both of the above. Right now it seems (B) must be done with a breakpoint, which isn't the right abstraction, and (A) can only be done by specifying VM arguments, which AFAIK is either per-launch config (thus must be specified too many times) or an IDE-wide preference (which pulls in run as well as debug configs).
Previous Topic:Can't Find javac on Windows
Next Topic:coloring java update
Goto Forum:
  


Current Time: Sat Nov 22 15:53:27 GMT 2014

Powered by FUDForum. Page generated in 0.02105 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software