Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Debugging - Stopping without a breakpoint [closed]

Tags:

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?

like image 801
Nick Heiner Avatar asked Nov 03 '09 17:11

Nick Heiner


People also ask

Why breakpoints are not working in Eclipse?

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.

How do I get out of loop while debugging in Eclipse?

As a user I would suggest the following: make a hotkey to exit the loop in debugging mode, for example ctrl-shift-F11.

How do I use toggle breakpoint in Eclipse?

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.


1 Answers

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 :)

like image 183
Mendo Avatar answered Oct 21 '22 10:10

Mendo