This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Debugging in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Debugging in Eclipse" Watch "Debugging in Eclipse" New topic
Author

Debugging in Eclipse

Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 52

Hi All,

I wanted to know is there any specialized way to debug multithreaded applications where I want to debug for exceptions like NullPointerException which is occurring randomly for randomly chosen thread. How to deal with this kind of situations? I will be waiting for your valuable replies...

Regards
Omkar V S


http://mynotesontech.wordpress.com/
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16458
    
  23

If a thread throws a fatal exception while debugging in eclipse, the offending thread should halt but the rest of the app would keep running. In the debug window, you can select the dead thread and see its stack context. I think the other threads keep running, anyway. I forget.

It's also possible to set breakpoints on NullPointerExceptions using the Eclipse breakpoint editor. The main problem here is that certain libraries are quite sloppy about using Null Pointer and Array Out Of Bounds exceptions for application purposes, which they intercept internally and keep running. So if you set a general breakpoint, you may be flooded with noise exceptions.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jay Damon
Ranch Hand

Joined: Jul 31, 2001
Posts: 282
To eliminate the "noise" exceptions, specify "uncaught" when creating a Java Exception Breakpoint.
Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 52

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Debugging in Eclipse