Eclipse not stopping at breakpoints while debugging - eclipse

I'm debugging a program which works with multiple matrix and the breakpoints are not working. When I start the debugging, a pointer appears indicating where in the code the program stopped. The thing is, this pointer doesn't appear in a line with a breackpoint, it shows up in wherever it suits it and the worst thing is that enters a function which gives me the values of the coordinates in the matrix so you can imagine that I'm in a loop that is hard to get out.
I have tried using the "Step Return" to get out of that function but, as a loop, I always end there again. Also, the "Ignore breakpoints" is not activated.
Have I some debugging option activaded by mistake? thank you for your time

I didn't check the "Breakpoints" window in the "Debugging" prespective thus not seeing that there were some kind of breakpoints that I didn't know about and I don't have any idea appeared. I removed them and I could debug as usual.

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~

Breakpoint in section of Matlab

I have written a MATLAB code defined in different sections. After running the first section of my code I would like to be able to debug subsequent sections using breakpoints. For some reason, however, when I add a breakpoint and use the "Run Section" command the debug mode is not triggered. It appears that I'm unable to run the beginning of the program and then use a breakpoint and the "Run Section" command. Does anyone know how to do this? I'm doing this to save time since the beginning of my program takes a long time to run. Thanks.
There are a couple of work-arounds I can think of which might help you.
First, when you get to your breakpoint, save the entire workspace to a .mat file. Then comment out all the code up to this point and add a line to load your .mat file. You can now get to the point in your code you are debugging quickly.
Another way to do it would be to put all the code past your breakpoint in a separate script. Then when you hit the breakpoint, you can set more breakpoints in the second script and call it from the command window as many times as you need.

Eclipse debugger freezes but gives no errors

I'm debugging someones code, and it freezes when I do something specific, but Eclipse doesn't stop on an error (I may have accidentally turned this off). When I press pause in the debugger, Eclipse shows me a bunch of suspended threads, where two of them are coloured red.
I want to find out if there is an error anywere, or if there's just an infinite loop somewhere (which doesn't seem likely, because Eclipse should break in the loop in that case).
I'd be great if anyone can help me with this Thanks in advance!
Maybe you have a deadlock?
You can use jconsole (goes with java jdk) to find out this. Launch jconsole, attach to your process, go to the Threads tab. Press "Detect deadlock"... It can be also useful to look at all threads states, for example you can have infinity loop in one thread and another thread blocked etc...
I've had this happen to me before, try inserting breakpoints every few lines of code, then stepping through those until it breaks, removing the breakpoints that don't have any errors between them. Remember the line of code that causes it to crash and make whatever changes are necessary to fix it.

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.

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.