59

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?

kloop
  • 4,537
  • 13
  • 42
  • 66
  • 2
    A diagonal like through the breakpoint means that the breakpoint has been disabled. In order to use the breakpoint, you would need to enable it. I believe you can just right-click on the breakpoint and select `Enable Breakpoint`, but I could be wrong. –  Jan 05 '12 at 18:55
  • `Enable Breakpoint` is graphically displayed as a color change. The diagonal line means Breakpoint Skipped' – Brethlosze May 09 '21 at 21:57

9 Answers9

157

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.

zb226
  • 9,586
  • 6
  • 49
  • 79
Anthony Accioly
  • 21,918
  • 9
  • 70
  • 118
  • 5
    Goodbye cruel IDE, I'm leaving you today. Goodbye, Goodbye, Goodbye. Goodbye, Eclipse CDT, There's nothing you can say To make me change my mind. Goodbye. – Dill Nov 29 '15 at 12:35
  • It happens me as well. If I hit by accident "CTRL + ALT + B" instead of "CTRL + SHIFT + B"... "skip all breakpoints" except of "toggle a breakpoint" – Alexander Khomenko Nov 23 '17 at 10:53
  • 1
    Sometimes you just don't know what answers will take off. Have an upvote. You saved me a tonne of frustration. – user4581301 Mar 28 '19 at 04:58
10

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.

Aaron Swan
  • 1,206
  • 1
  • 13
  • 20
  • Thanks, saved my day! Btw. a non working "Default" is a very bad "Default". (I don't even know what "Default" means in this situation). Eclipse should chose "C/C++ Breakpoints" by "Default" for C++ projects, no? – Paul Bußmann Nov 27 '16 at 07:24
  • Are you perhaps running the JSDT chromium remote debug feature? Look for presence of plug-in org.eclikpse.wst.jsdt.chromium.debug.ui to confirm. I found that that plug-in registers a default breakpoint type that is enabled and set as the default on all instances of ITextEditor, which means it will be set by default in C++ source files. I'm going to submit a bug report to suggest that they not specify the enablement so broadly. – MidnightJava Mar 02 '17 at 17:47
  • I submitted this bug on JSDT: https://bugs.eclipse.org/bugs/show_bug.cgi?id=513008 – MidnightJava Mar 02 '17 at 22:35
  • I do not have the chromium plugin. – Aaron Swan Mar 03 '17 at 16:28
4

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

anajem
  • 85
  • 2
2

My "toggle breakpoint" and other menu options were disabled. I restarted Eclipse (Kepler SR1) and they came back enabled. I could set breakpoints again!

James Joyce
  • 1,694
  • 18
  • 20
2

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.

Theodore Murdock
  • 1,538
  • 1
  • 13
  • 28
2
  1. Open Debug View
  2. Open Breakpoint Perspective
  3. Right-click all breakpoints there
  4. Press Enable
Adel Boutros
  • 10,205
  • 7
  • 55
  • 89
1

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.

deepwinter
  • 4,568
  • 2
  • 31
  • 37
1

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.

Sascha N.
  • 65
  • 1
  • 6
0

There might be a chance Skip All breakpoints selected. Windows Menu-->Show Views-->Breakpoints-->Disable Skip All Breakpoints

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 26 '23 at 12:48