Can't set breakpoint in eclipse - eclipse

I'm using eclipse (and also the groovy-eclipse plugin), and sometimes I can't set breakpoints on lines. I'll double click the gutter, and the breakpoint will flash on then off, and it will set the breakpoint somewhere else, lower in the code.
I'll be able to set breakpoints fine for certain parts of the code, but some sections of the code will exhibit the above described behavior.
When this happens I have to restart eclipse, or cut the code i want to set the breakpoint on, and paste it lower in the file.
Anyone else experience this, or have an idea what causes it?

What version of Groovy-Eclipse are you using? We have recently fixed a few problems in this area. I'd recommend updating to the latest release, 2.1.1.
There is one known open issue in this area, documented here:
http://jira.codehaus.org/browse/GRECLIPSE-888
There may be more issues and if you find any strange breakpoint setting behavior after updating, then please raise a new jira issue for it.

Well, there are few types of breakpoints available in Eclipse:
Line Breakpoint -> Lines those will be executing. You will always get a breakpoint.
Method Breakpoint -> for methods
WatchPoint -> for member declarations.
BreakPoint -> for class level breakpoint
When u double click for breakpoint at a line containing bracket "{" or "}", the LineBreakPoint is set to the next executable line automatically.

Related

Some breakpoints not hit Eclipse ADT

I have 4 breakpoints but only 2 are getting hit. What I notice is that the breakpoints getting get hit show a small check mark in the breakpoints view.
What does this check mark mean and how can I activate my other breakpoints?
There is some explanation of the various symbols here:
What different breakpoint icons mean in Eclipse?
I've just tried it myself and it appears that your breakpoints are not disabled, but the little check mark only appears once you're actually executing the function that the breakpoint is in. So the reason your breakpoints aren't hit, is because there is no code path that leads into the code you're trying to debug, i.e. you're not calling it.
Found it. This is an issue where breakpoints other than on the main thread are not hit. This is an exclusive problem on the Samsung Galaxy S5 under Lollipop.
http://developer.samsung.com/forum/thread/android-studio-does-not-stop-on-some-breakpoints-when-connected-to-samsung-galaxy-s5-with-lollipop-5/202/277622?boardName=General&listLines=15&startId=zzzzz~

Jump/Goto last "running" breakpoint line

I am using Eclipse 3.4 and debugging Java. I have set a couple of breakpoints and that works fine. I run to a line and then it stops. I can inspect and all.
BUT If you I choose to enter a class or more I loose where the breakpoint actually was, that is where the debugger has stopped. I have to keep track of it myself and scroll back and stuff.
I just want to go back to where the last breakpoint was ( that is where the debugger has stopped )
How can I do that?
Thanks!
=== EDIT ===
I know that I can watch the call stack but nothing there is highlighted so it is a bit difficult.
I do not know of such a possibility.
However, depending on the number of active breakpoints you are using, maybe the "Breakpoints" view can help. Here you can see all breakpoints you have defined. If you make a doubleclick on an entry, Eclipse jumps to the corresponding source location.

Using Breakpoint in Eclipse with counterclockwise debugger

While everything is configured properly, clojure working fine with Eclipse, I am unable to add breakpoint to code. On right clicking in Text Editor's window there is no option as "toggle breakpoint" for debugging.
http://code.google.com/p/counterclockwise/issues/detail?id=288&start=100
I posted an issue to CCW bugtracker.
It seems, latest version of the CCW plugin somehow forget about debugging.
This is usually indicative that Eclipse do not think that your source file corresponds to a class file that it knows of.
In other words, it has no idea that your code is actually code.

XCode/GDB stops on my auto-continue breakpoints when debugging on Device

I just discovered (thanks to another very helpful post) that I can use GDB commands to create breakpoints that log information to the GDB console, whether debugging on the device or simulator. This is like NSLog, but much nicer in that you don't have to wait for the console to catch up, you don't have annoying timestamps, and you can turn them on/off at run time via the XCode breakpoint view).
Very nice, and I invested time figuring out how best to log messages and variables together. (Use the GDB command po [NSString stringWithFormat: #"Your message: %d %#",variable,[[object expression] description]]) for maximum versatility.
Everything worked wonderfully in the simulator. When I finally got around to device debugging, I was getting the messages just fine, but GDB was STOPPING on every breakpoint despite the fact that I configured them to auto-continue by checking the box in the breakpoint view.
I tried adding a "continue" commmand to each breakpoint, and it worked but GDB also started spewing information about every breakpoint hit and telling me "Continuing" after every line.
My questions:
Does this happen for you?
Can I change something so that auto-continue also works on the device
Can I tell GDB to be less verbose and only give me the output I print?
Please help!!
David
I've run into the same behavior. It turned out that XCode had duplicated the breakpoint at the intended line. Perhaps there's a bug where a left click occasionally adds a hidden breakpoint rather than disabling?
The solution was this:
Select the "Breakpoint Navigator" tab of the Navigator frame on the left
Look for duplicate breakpoints either manually or by entering the class name in the search box at the bottom of the Navigator. (remember that multiple project sections of the list may both contain a breakpoint for the same class)
Right-click on one and select Edit to figure out if it's the continue or not.
Right-click on the unwanted breakpoint and delete
David,
There are some useful console commands that you might want to familiarize yourself with.
info b (lists all breakpoints)
ena (enables all breakpoints)
dis (disables all breakpoints)
ena X (enable breakpoint number X)
dis X (disable breakpoint number X)
GDB also supports conditional breakpoints:
cond X [condition]
And, commands to execute automatically when a breakpoint is hit:
command X
Aaron
Another very useful option is a watchpoint - break only when given expression changes.

How to remove breakpoint from eclipse?

I am facing strange problem with eclipse [Ganymede]. Once I added some breakpoints in my code and now even after I delete all those breakpoints, it appears again when I start the eclipse.
So, regularly first thing what I have to do after starting the eclipse is manually delete all breakpoints to start working. Probably eclipse stores the information about these breakpoints in some file and, I think, if I will delete that file my problem might be resolved. Please let me know if you have some solution for this.
Another solution
Eclipse -> Run -> Remove All Breakpoints - for removing all Breakpoints for all Time
Eclipse -> Run -> Skip All Breakpoints - for temporary remove breakpoints
Perhaps it helps to check the Breakpoints view (Ctrl+3, type 'breakpoints') and see if they are inactive only or something. There, you can also deactivate them all at once (strikeout button).
You can go to debug prespective
and check or uncheck the desired breakpoint in the Breakpoints view
or show the view from the Window menu
Happened to me to. I think it's eclipse bug. I filed a bug for it, will update once there's progress on it.
I had a couple of "unable to load breakpoint" warnings which wouldn't go away, even after I deleted all breakpoints via the run->remove all breakpoints command. These were on "dead code" paths which had been abandoned for use in the present project.
Closing and re-opening eclipse made them go away.