why can't I set up a breakpoint in eclipse?
EclipseBreakpointsEclipse Problem Overview
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?
Eclipse Solutions
Solution 1 - Eclipse
You've probably just pressed "Skip All Breakpoints" in the Breakpoint view - simply press it again.
Default key bindings are: Ctrl + Alt + B.
Solution 2 - Eclipse
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.
Solution 3 - Eclipse
in python, I had to go to: windows->perspective->Open Perspective->Debug then select the Breakpoints tab and make sure the zero with the slash (skip all breakpoints) is not selected (you can also use Ctrl-Alt-B to toggle it).
Solution 4 - Eclipse
- Open
Debug
View - Open
Breakpoint
Perspective - Right-click all breakpoints there
- Press Enable
Solution 5 - Eclipse
My "toggle breakpoint" and other menu options were disabled. I restarted Eclipse (Kepler SR1) and they came back enabled. I could set breakpoints again!
Solution 6 - Eclipse
In my case, I'd edited my code during debugging, adding a null-check so I could place a breakpoint to stop execution only when a certain value was null. I couldn't add a breakpoint because the line of code in question was not present in the running application.
In Java, certain code changes can be woven in as soon as the file is saved, so in my case, remembering to save the changes was enough to enable placing a breakpoint.
For changes that can't be woven in, the application must be restarted before the new lines of code will be present.
Solution 7 - Eclipse
In my case, I opened up the Breakpoints view, clicked 'remove all breakpoints' and then toggled the 'skip all breakpoints' option off, then on. This allowed me to set breakpoints again. This was after a restart of eclipse failed to help.
Solution 8 - Eclipse
I was having a simular issue, for me the standard code-editor changed after installing a new plugin from Marketplace. Apparently the Plugin thought to change the default-editor for a lot of file-types, not only the one I installed it for. The new editor did not allow setting breakpoints but I hadn't known it changed at the time. When I right-clicked my source-file in the Project-explorer I saw under open-with the new editor listed on top. When I opened with the previous editor, everything went back to normal.