Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why can't I set up a breakpoint in eclipse?

For some odd reason, I can't use breakpoints in my eclipse project. All breakpoints that I set have a diagonal line on them, above the dot in the respective line (on the left margin of the window), as if they are blocked. When I run in debug mode, the breakpoints are ignored. Any ideas?

like image 620
kloop Avatar asked Jan 05 '12 18:01

kloop


People also ask

How do I enable breakpoints 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.

Why does breakpoint not work?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

Why is Eclipse debugging not working?

The solution was to enable it again, start a debug session, the breakpoint is hit and shown in the UI, then disable again the option. There is also another simpler way that will make Eclipse show the debugging highlight at the breakpoint or rather refresh the debugging UI to work as it should.

How do you activate a breakpoint?

To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.


2 Answers

You've probably just pressed "Skip All Breakpoints" in the Breakpoint view - simply press it again.

Skip All Breakpoints (Ctrl + Alt +V)

Default key bindings are: Ctrl + Alt + B.

like image 92
Anthony Accioly Avatar answered Sep 26 '22 01:09

Anthony Accioly


This doesn't exactly answer the OPs question, but when trying to double click to add break points, I was getting messages stating "this feature is not enabled".

I had to right click on the break point bar and select "Breakpoint Types" -> "C/C++ Breakpoints" instead of "Default". Then it worked fine.

like image 40
Aaron Swan Avatar answered Sep 27 '22 01:09

Aaron Swan