I am debugging some Java code with Eclipse 3.4.2. I have disabled all the breakpoints, yet the debugger still stops at a specific line. This point is several lines before a null pointer exception
is triggered. Curiously, when I run the same code/run configuration, but not in the debugger, the null pointer exception does not occur.
Also, if I step through this code from the beginning of the method causing the null pointer exception
, using the exact same input, there is no problem. It only occurs when I remove all breakpoints but Eclipse decides to stop there regardless.
Why could this be happening?
The debugger stops at main because a temporary breakpoint was set there. You don't see it because it evaporates as soon as it is hit. So, Eclipse IS setting breakpoints that work.
As a user I would suggest the following: make a hotkey to exit the loop in debugging mode, for example ctrl-shift-F11.
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.
I had the same problem and finally found the following configuration option: Windows -> Preferences -> Java -> Debug -> Suspend execution on uncaught exceptions I unchecked it, and the problem disappeared. However, may be it's good to know about uncaught exceptions. I just disabled it because the problem was in Spring framework, not in my code, and hence I could correct nothing... Hope it helps :)
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