have an Android app in Eclipse. At some breakpoints my debugger stops, at some it doesn't. Where it doesn't I added log output messages, I do see these messages so code is executed. I did the usual things, like restart Eclipse, clean project, new workspace, wiped app from device. What I found on the net is that some other byte code is executed and so the debugger cannot find the breakpoint. But after deleting the app, the bytecode should be the one generated from Eclipse. The breakpoint which is not being used is never getting this little tick mark. It is active and it doesn't have any conditions.
How can I figure out what is happening?
Related
I just installed eclipse, but idk if something is wrong with the config or something.
I ran a simple test code that runs perfect, but I can't use the debug option. I installed the eclipse in my main pc and a laptop, but in both, debug work like the "run", running the code completely without allowing step option like it should, it doesn't even switch to the debug perspective or enable the options of step into step over....
Here is an img after pressing the debug
(cant post a img yet, so here is the direct link)
https://i.imgur.com/p09IznQ.png
hopefully, you guys can help me
Your app finishes instantly. To start debugging, you have to pause execution first, and you can't get there because this app is simple enough to get done in milliseconds. Click in the left margin somewhere near the 'top' of execution (such as: the first line of the main method), or double click - you want a green dot to appear (indicating a breakpoint). That'll cause a pause and then you can do all the stuff you wanna do. The debug view opens automatically on hitting a breakpoint, not on hitting the debug action. It's more convenient that way.
I was working/debugging normally on my Java-Maven project with IntelliJ 2018.2.1, I then click on Intellij to Stop the app to make some modifications to the code and when I start the application again in debug mode, it (the debugger) simply stopped working.
Now, the application takes about +10+20 seconds to start and when the breakpoints are hit, it simply hangs and do nothing else.
I have tried many of the suggestions posted on Internet, but none of those seems to work. I also tried to Invalidate/Restart the IDE, but nothing.
Now, the breakpoints aren't even marked as valid any more, it only shows the red circle without the tick verification check. And it also extended to all projects, so now none of the projects the debugger works and the same symptoms are in all projects.
If anyone have any suggestion on this, would really appreciate it.
Solved the issue. It ended up being that I am using another application (NetLimiter) to limit the traffic in the network and I limited few days ago IntelliJ to consume only 5 kbps at any time and this was the problem. I simply removed the limitation and the debugger starting working again normally at its usual speed.
This is typically caused because there is a process running that it is connected to but you have no way to find it.
The only way to resolve it is to reboot your machine.
Now, the application takes about +10+20 seconds to start and when the
breakpoints are hit, it simply hangs and do nothing else.
By this syptom I can suggest that you have accidentally added some field or method breakpoint. Please check that there are no field or method breakpoints present in Breakpoints window (Ctrl + Shift + F8). If they exist - remove them.
Ive been debugging a project in eclipse. I inserted a breakpoint on a while statement. All was working fine, I was monitoring the variable increments. I tried to change the test class, but forgot I was still running the program, a message popped up and asked a question (I can't remember the exact phrasing) and I clicked terminate. But now when I run the debugger, it runs through the program and gives me the following
<terminated, exit value: 0>
But it doesn't allow me to step through the program. I tried "skip all breakpoints" but that isn't the answer.. It has something to do with the pop up message I'm pretty sure.
Many Thanks for your help
Probably the debugger skips all breakpoints.
Hit the search button in the top right corner
Type skip all breakpoints
Click the result.
Debugger shall be working from now on.
I had the same issue earlier, I have found the answer on youtube :)
Somehow, whatever code I add to my program it does not run on my android device. It just runs my old code.
I am constantly deleting my app from my phone in the App Manager.
If I add new or change functionality the old code still runs.
I even delete complete blocks of code that should obliterate functionality. But somehow all the old functionality remains in the app after reinstall.
Simple example: On a TextButton click i shift some UI element by 200. This works great. When i delete the complete button listener it still works great but i guess completely by itself since the code should be gone.
I tried restarting Eclipse without luck.
This thing is driving me crazy. I was stuck for hours on some simple code and baffled why it did not run. Then I discovered my logs where not showing in logcat. Somehow, sometimes it does update the new code into the device since now i have a log on device resume but i deleted that at least 30 minutes ago and now it is still showing in my logcat.
Desktop app works as it should. I somehow have the feeling this happened before and over time this got worse, up to this point where i cannot test anything anymore.
So to be clear:
I add code to my app.
Run it from eclipse as Android application
No changes show up
Delete app from phone using the phones Application Manager
Delete a complete code block like the show() method that holds my complete stage
Run it from eclipse as Android application
App still runs as it was with the complete stage in tact.
-- edit --
Now I did not do anything to my code for a while and ran it. Now it probably took the code with the version with the empty show() method. However this already has been undone in the present. Could eclipse be stacking runs?
Check
"Project -> Build Automatically"
is checked. (Most likely your problem).
Also doing a
"Project -> Clean..."
tells the IDE to delete any previously compiled binaries and rebuilds them. (The APK file).
This could happen if there is an error in your code and you have selected run without warning when error in program exists. In such a case the last successfully built code would get pushed! As Lestat mentioned try doing a clean, if the project now shows up errors you have your culprit, else make sure your XML files are all proper.
Another check could be to see the timestamp of the last generated apk file in your workspace.
PS: There is a bug in eclipse where it doesnt save a file at time, a simple workspace restart fixes this.
Had the same issue - updated my code and yet the phone was running the old.
Tried Build --> Clean Project
Tried File --> Invalidate Caches/Restart
Now it works and recognizes the new code!
That said curious what #1 and #2 did behind the scenes??
I'm using Eclipse Juno to debug a java class while testing with junit, but the debugger has been acting flakey. I will reach the breakpoint I want and all seems well with the variable values, but in my console, all of the print statements I set up later in the code are popping out as if I were stepping through it!
(note: they aren't printing as fast as they normally would if I had simply run it, and the output itself is a bit garbled compared to normal output).
Somehow, the code is executing through without me pressing a button. If I try to step through, my view of the code and variables is correct, but debugging stops once Eclipse thinks the program has finished.
Something I should probably mention is that I recently put Fedora on my laptop, so I haven't been running eclipse on it for very long and this is my first time trying junit. Is is possible that I need to download something for my debugger?