104

Eclipse 3.5.2 is not stopping in breakpoints. It's as if the debugger is using an older version of the source file.

Tried the usual refresh, clean all projects, build all, with no change.

Already in debug mode and the break point is checked.

*ok ended up deleting the whole project and checking it out again. but still curious what the issue was.

Ayrad
  • 3,996
  • 8
  • 45
  • 86
  • 2
    Did you clean all before build all? – Yusuf K. Dec 08 '10 at 13:51
  • 2
    yes cleaned all projects and built automatically is set to on (will update question). Will try a restart, pc has been running really funky. – Ayrad Dec 08 '10 at 13:58
  • First things first, update to Eclipse 3.6 and CDT 7. BTW, the version 3.5.2 or Galileo is the platform version, not C/C++ IDE version. – Kos Dec 08 '10 at 16:25
  • Do you run your app from eclipse? If not, you're using remote debugging, it probably the source code in eclipse not matching the running binary code. – Kane Dec 09 '10 at 04:51
  • @kane the app runs on a tomcat server. How do you make sure the source matches the running binary code other than build all clean etc.? – Ayrad Dec 09 '10 at 13:54
  • The version convention of eclipse always has the qualifier string, so you could check out the corresponding tag/version from SCM. If you could stop the server and redeploy the app, you could export the jar based on the source code in your eclipse, then replace the jars on the server by your exported jars. – Kane Dec 09 '10 at 14:12
  • What version of Java are you running your project with? – Joshua McKinnon Dec 22 '10 at 20:06
  • Don't click Play. Instead go to: Run > Run As.. > Java Application – JustBeingHelpful Sep 22 '14 at 21:26
  • @Ayrad How did you solved this. I'm having almost same issue as mentioned in the question: https://stackoverflow.com/questions/44802878/eclipse-neon-debug-mode-is-not-working – Sajeev Jun 28 '17 at 13:57
  • @Sajeev deleted the local projects, checked them out again from version control and restarted computer. – Ayrad Jul 01 '17 at 04:07
  • Also, the source file needs to be found if you are remote debugging. If there is a red X icon over your breakpoint icon on the source file, then Eclipse will not place a breakpoint – bschwagg Oct 16 '18 at 20:32
  • It seems as one more Eclipse bug. The similar problem (stopping on polace without breakpoints) is discussed here (https://stackoverflow.com/a/8938475/715269) – Gangnus Nov 29 '18 at 12:44
  • Possible duplicate of [Eclipse - debugger doesn't stop at breakpoint](https://stackoverflow.com/questions/1370868/eclipse-debugger-doesnt-stop-at-breakpoint) – BuZZ-dEE Dec 17 '18 at 14:04
  • As of this writing this page has been viewed 185k times. How depressing. – Graham Leggett Jun 07 '22 at 22:35

45 Answers45

177

Perhaps you have pushed the Skip all Breakpoints button in the Breakpoints view.

Fabian Steeg
  • 44,988
  • 7
  • 85
  • 112
  • 6
    The button is not pressed. It's just behaving strangely breaking at empty lines skipping others etc. – Ayrad Dec 08 '10 at 15:46
  • Do you mean `Remove all Breakpoints`? I did not see any `Clear breakpoint` button. – Thupten Jun 26 '13 at 22:39
  • 4
    I know this is an old answer, but it's still useful! You saved me! Breakpoints worked, then stopped working. This was the reason, although I swear I never clicked that button...I'm using the current (as of right now) Eclipse Luna 4.4.0, with the current CDT. – bitsmack Aug 18 '14 at 22:44
  • 3
    @Dc01_xx thanks for the comment "clear All break points" .. That was the issue for me. I tried everything else but could not get eclipse juno to stop at breakpoints in my j2ee application. Why not add it as an answer so that it is easily visible to people facing this issue. ? – Raj Jun 23 '15 at 09:41
  • 1
    It seems that Skip All Breakpoints was checked by default when I first installed Eclipse. I sure didn't check it. – Don Smith May 01 '19 at 23:58
29

Thanks guys, this really saved my day too. I antecedently pressed on skip break points, if you did the same this will result on break point appearing with a backslash icon on them.

To bring it back to normal:

  1. Switch to Debug perspective.
  2. press on the breakpoints view tap -->> upper right hand corner of the screen, you also can go there by Window->show view-> breakpoints.
  3. 5th icon from the left you will see break point with backslash. press on that one.

To confirm, try putting break point on any line, and it should appear normally.

Magnilex
  • 11,584
  • 9
  • 62
  • 84
Kareem
  • 819
  • 9
  • 11
  • 6
    ++B will toggle this mode without having to find the window, etc. I just did this to myself accidentally somehow too... – JeffC Sep 06 '15 at 14:30
27

Press Ctrl + Alt + B

OR go through below steps

enter image description here

ChandraBhan Singh
  • 2,841
  • 1
  • 22
  • 27
17

Clearing all Breakpoints fixed the issue (within debugger perspective: Window -> Remove All Breakpoints).

Remove All BreakPoints

Rebuilding the project did not work for me.

Theo
  • 57,719
  • 8
  • 24
  • 41
Richard
  • 179
  • 1
  • 4
10

Sometimes you do start the debug mode but the debugger doesn't actually get attached/gets detached. I've also had this issue a few times when my laptop was reacting really slowly. A reboot always solved it for me.

Also try doing a clean all (works miracles in Eclipse).

jack
  • 1,902
  • 5
  • 32
  • 43
7

Please un check this from the Eclipse Menu.

Run->Skip all breakpoints.

I think this will be enabled permanently once You select the Remove all Break points option in the Debug/Breakpoints window.

kanaparthikiran
  • 523
  • 12
  • 15
6

Performing a "Clean All" worked for me.

Click on "Project" tab --> "Clean" menu-item.

In the "Clean" dialogue-box select "Clean all projects" radio-button. Leave the remaining values as default. Click "OK" button.

BINGO!!!The remote-debugging started working for me as beautiful as before.

David
  • 15,894
  • 22
  • 55
  • 66
Arry
  • 107
  • 1
  • 4
5

It has also happened to me, in my case it was due to the GDB launcher, which I needed to turn to "Legacy Create Process Launcher". To do so,

  • either change the default launchers to the "Legacy Create Process Launcher", in Windows>Preferences>Run/Debug>Launching>Default Launchers.

  • or choose this launcher in the debug configuration of your application (Run>Debug configurations>choose your debug configuration). Under the "main" tab at the bottom, click on "Select other...", check the box "Use configuration specific settings" and choose "Legacy Create Process Launcher".

FlorianT
  • 1,147
  • 11
  • 16
  • As I say in my answer http://stackoverflow.com/a/28631658/2937955, the problem with SDF GDB in my case was caused by GDB not understanding properly the source lookup path hence ignoring the breakpoints. – FlorianT Feb 20 '15 at 15:23
3

I had a conditional break point wrongly put on the method entry point. Removed that breakpoint and it worked.

Note: Tried Skip all Breakpoints, Clean all projects, Refresh, close Eclipse with no luck before nailing it.

ankitkpd
  • 663
  • 5
  • 19
  • had a similar problem - looks like a stuck breakpoint somewhere can stop eclipse from having any working breakpoint at all. Even reboot didn't help - but removing all breakpoints worked. – Dr. Azrael Tod Nov 16 '18 at 10:53
3

In my case, somehow the breakpoints got automatically disabled because of this switch turned on, skip breakpoints.

enter image description here

Omeri
  • 187
  • 2
  • 16
2

Breakpoints have seemed to work and not-work on the versions of Eclipse I've used the last couple years. Currently I'm using Juno and just experienced breakpoints-not-working again. The solutions above, although good ones, didn't work in my case.

Here's what worked in my case:

  1. deleted the project

  2. check it back out from svn

  3. import it into Eclipse again

  4. run "mvn eclipse:eclipse"

Since the project is also a Groovy/Http-bulder/junit-test project, I had to:

  1. convert the project from Java to Groovy

  2. add /src/test/groovy to the Java Build Path (Source folders on build path)

  3. include "**/*.groovy" on the Java Build Path for /src/test/groovy

Magnilex
  • 11,584
  • 9
  • 62
  • 84
Robert
  • 675
  • 8
  • 16
2

I had all breakpoints enabled and configured as I should. But whenever I clicked "debug" it would only step through the program (press f5/f6) Turns out there was a rogue setting

Right Click project > debug configurations > "Debugger" tab > uncheck "Stop on startup at:" box

andrew
  • 2,451
  • 1
  • 15
  • 22
  • I had a similar issue, all breakpoints in main stopped working because of the temporary breakpoint set by Eclipse at entry to main. Disabling "Stop on startup" solved it! – Hertz Apr 04 '17 at 12:39
2

One reason for this situation can be, that you have pressed 'skip all breakpoints', when play- and another pictures are smaller than those normally are (because of higher resolution screen). Another thing can be, that break points are stopped only under VM threads, not under normal threads!

Tuomas
  • 169
  • 2
  • 4
2

switching workspace worked for me. Go to File > Switch Workspace and choose different folder (workspace) That's it and BINGO! Debugging started working for me as beautiful as before.

Exception
  • 789
  • 4
  • 18
2
  1. Go to (eclipse-workspace)\.metadata\.plugins\org.eclipse.wst.server.core and delete all tmp folders.
  2. Clean and Restart server.
Ankur Soni
  • 5,725
  • 5
  • 50
  • 81
Philip Rego
  • 552
  • 4
  • 20
  • 35
2

In my case I had to enable then disable an option in the Preferences. I don't prefer the debug view to keep jumping when a breakpoint is hit so I disabled this option, but caused the issue in question.

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.

Looks like a bug in Eclipse 4.17

enter image description here

UPDATE

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. After the breakpoint is reached, Eclipse will ask you to switch to debugging mode if you are not already in, click switch button, then activate the debug tab/view, you will notice that the stepping buttons are activated and the breakpoint line is highlighted.

2
  • First remove all 'toggle breakpoints' from the class file.
  • Then Eclipse requires a restart.
  • Then make sure 'Skip All breakpoints' is NOT enabled. If it is, make it disabled.
  • Then, add toggle breakpoint to the lines in your file and run on Debug mode.
  • A pop-up window must appear to confirm if you really want to Switch to debug mode. Say Yes and proceed.
wovano
  • 4,543
  • 5
  • 22
  • 49
Deb
  • 587
  • 4
  • 12
1

I suddenly experienced the skipping of breakpoints as well in Eclipse Juno CDT. For me the issue was that I had set optimization levels up. Once I set it back to none it was working fine. To set optimization levels go to Project Properties -> C/C++ Build -> Settings -> Tool Settings pan depending on which compiler you are using go to -> Optimization and set Optimization Level to: None (-O0). Hope this helps! Best

gomfy
  • 637
  • 8
  • 16
1

I had the same problem, and I found the real cause.

I had written some concurrent / multi-threads code, while I added some breakpoints inside the code running in a new thread. So, when JUnit tests ran over, and stopped soon, the code will not reach and stop at the breakpoints.

For this situation, we have to click and select "Keep JUnit running after a test run when debugging" check box at "Debug Configurations..."

zengsn
  • 5,045
  • 1
  • 14
  • 9
1

go breatpoint and click on 5th to eclipse->window>->show view->other->debug->breakpoint and click on 5th option (Skip All Breakpoints)

1

Make sure, that you are using the correct JRE version to debug your project. Especially if it's a third party project.

Also make sure, that there is no trigger point set for any breakpoint.

lauxjpn
  • 4,749
  • 1
  • 20
  • 40
0

I had the same problem when I was using Eclipse Juno.. I installed Eclipse Indigo and it works fine. Try to reinstall eclipse.

kod
  • 11
  • 1
0

A different solution worked for me. I also faced the same problem - debug points were not being updated, though they are shown correctly in the IDE editor and in Break Points tab.

My problem and solution are: While creating the project, the 'Default Output Folder' points to different location. At a later stage, I have mavenized the project, selecting "Project Right Click - Configure - Convert to Maven Project". So there are two sets of output folders exist in my project file system. Cleaning the project multiple times did not solve my problem. In the background it was pointing to different binary files. Finally, when I removed the Maven Feature and cleaned the project, this time everything worked fine. Env: Eclipse Juno and JRE is J2SDK 1.5.

Pavan
  • 1
0

I get all breakpoints skipped and marked as warnings when using -O2 in the compiler flags. Switched to -O0 -g in my makefile and breakpoints now work. Hope this helps.

wgodoy
  • 776
  • 11
  • 13
0

If it doesn't stop even after unchecking SKIP ALL BREAKPOINTS, you can add this android.os.debug.waitfordebugger just before your breakpoint.

If you do this,your app will definitely wait for debugger at that point everytime,even if you are just running your app,which it will only find when your device is connected to eclipse.

After debugging you must remove this line for app to run properly or else android will just keep waiting for the debugger.

Shiva
  • 6,677
  • 4
  • 36
  • 61
user3215142
  • 326
  • 2
  • 6
0

Try to restart eclipse, that works sometimes. I guess there is some kind of cache there.

Eric
  • 22,183
  • 20
  • 145
  • 196
0

In my case the debugged code in JBoss was older than the code in the Eclipse project. Rebuilding the .war solved the problem.

weberjn
  • 1,840
  • 20
  • 24
0

Facing same problem with Eclipse Luna. Project clean didn't work. Rebuild didn't work.

What makes it work is uninstall the app on the device before each debugging.

desm0nds
  • 160
  • 1
  • 1
  • 9
0

I use the Eclipse FileSync plugin for live remote debugging. Make sure you tick Allow different target folders & edit the Target folder file setting in the tree view.

Setting the Default target folder by the Browse... button without Allow different target folders will set all folders to the same target (I had both libs & classes set to the default for libs so my breakpoints did not update).

Stuart Cardall
  • 2,099
  • 24
  • 18
0

Since Eclipse 4.7/Oxygen released in June 2017, there is a new concept of "Triggers for breakpoints", which is displayed as a small "T" next to the breakpoint "blue bullet" icon.

All the other breakpoints that are initially suppressed by triggers will be hit only after any of the trigger points has been hit. All the triggers are disabled after a trigger point is hit and will be re-enabled after the run.

In order to reset all the "trigger" flags, you need to do the following steps :

  1. Switch to Debug perspective.
  2. Right-click in the "Breakpoints" view
  3. Select "Remove All Triggers".

Note : this step does not delete all your breakpoints, which occurs when selecting "Remove All" in the same contextual menu.

Note : the keyboard shortcut to enable the triggers is "Alt-R", which takes precedence on the shortcut to open the "Run" menu with its mnemonics, when the "Breakpoints" view is selected.

metatechbe
  • 657
  • 9
  • 9
0

For me, updating gradle-wrapper.jar file worked.

dustytrash
  • 1,568
  • 1
  • 10
  • 17
0

Running under Ubuntu 18.04LTS in a VirtualBox VM. This answer pertains to Eclipse PTP.

By default, double clicking on the left margin was adding PTP Breakpoints (I am not familiar with PTP debugging). Those apparently do not make debugging stop. I right-clicked on a breakpoint -> Breakpoint Types -> C/C++ Breakpoints, and it started inserting this other "usual" type of breakpoints.

You can tell one from the other, as they are indicated with large green vs. small purple circles.

0

None of these solutions worked. only changing the workspace worked for me.

flashleo
  • 45
  • 6
0

In my case it happened because I was trying to set breakpoints in a file for some SVN revision instead of current file in working directory.

Solution: when you set breakpoints make sure it's actual file from your working copy. You can observe file name:

  1. actual file: SomeClass.java
  2. file from revision 123: SomeClass.java 123

In your case 123 can be any revision number

valijon
  • 1,304
  • 2
  • 20
  • 35
0

My variation of the issue: Occurred when trying to remotely debug a C application using an "attach to application" debug configuration in eclipse for linux, which was set to connect to a device running gdbserver through TCP. In particular, I could sometimes set/stop at breakpoints using the gdb console, but never through the source editor UI. Breakpoints in the breakpoint menu did nothing and were not listed when I ran info breakpoints in the gdb console. I am only debugging through eclipse, not building. But I tested the fix below works if I also configure the project to build.

My fix: By switching to "remote application" with "manual launcher" setting in the debug configuration menu, I was able to give eclipse the parameters to the remote machine, start gdbserver myself on the target via telnet, and then debug with breakpoints in the source editor UI.

This idea was suggested by the thread1, but it was a little tricky to find how to use the manual launcher for gdbserver. It is a blue link next to the "Revert" button inside the Debug Configuration menu that says "Select other...". You then need to check a box in the dialogue that appears to use custom configuration of that setting for the particular project, and from there you can switch from automatic to manual.

Chris
  • 41
  • 6
0

I think my existing Debug Configuration got corrupted somehow. I recreated it and attached all the projects again, and it works.

Adrian C
  • 71
  • 3
0

Had the same problem out of the sudden, nothing in this thread helped. Fix that worked for me:

Eclipse Preferences
   General -> Editors -> Text Editors -> Annotations
      Debug Call Stack
      Debug Current Instruction Pointer

Make sure that everything is checked and afterwards click "Restore Defaults" + "Apply" buttons and restart Eclipse.

Eclipse Fix

lzdt
  • 489
  • 1
  • 6
  • 17
0

Rgith click on breakpoint position -> Break point type -> C/C++ breakpoints. This solved my problem.

mohammadsdtmnd
  • 330
  • 1
  • 11
0
  • Click on Run manu

Run menu screenshot

  • Click on Remove all Breakpoints

remove breakpoints

  • Run Your Project On Debugger mode
0

Nothing here worked for me. I had to reinstall eclipse, new project, (delete old .project file). Clean fresh restart and the debugger comes back.

Feng Zhang
  • 1,698
  • 1
  • 17
  • 20
0

Change the optimization level of the compiler to not optimized. That was the issue in my case

Ronen333
  • 69
  • 1
  • 8
-1

My problem was that my debug view was closed and when I would try to hit a breakpoint, eclipse would just freeze and give me no indication of where it stopped.

You can show the Debug View on Mac by clicking Window > Show View > Debug

David Hudman
  • 301
  • 4
  • 8
-1

If cleaning and restart machine do not help, the reason may be the default debug port is used by another app. Changing to another value should work. In my case using IBM RAD:

  1. Open Administration Console
  2. Go to Server/Server Types/WebSphere application servers. Click link [server1] (the default name)
  3. Open Java and Process Management/Process definition
  4. Open Java Virtual Machine
  5. At [Debug arguments], change port number 7777 to the new one
  6. Save and restart Server. Done!
-1

Please follow below steps:

  1. Go to -> Run-> Remove all breakpoints

  2. restart Eclipse

  3. Put some break point and Debug with run configuration

Clearing all Breakpoints fixed the issue

Aman Garg
  • 3,122
  • 4
  • 24
  • 32
-2

Same Problem!! Easy and Fastest Solution!! Just remove All breakpoints in debug perspective and reapply breakpoint. Works like a charm!!