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.
Related
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.
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?
I started developing a game in Java with Eclipse. As you all know you have to debug a lot while coding. But I have the following issue:
My game is full-screen. If I run into a breakpoint it stops (like it should) and for some reason I can't switch window anymore (I am using Windows 7). I have to press Ctrl + Alt + Delete" and start the "Task manager" to be able to switch to Eclipse window and continue debugging.
So I tried to use window mode instead of full screen. Now if I run into a breakpoint the Eclipse window gets the focus (automatically) and I can debug easily.
So I thought it would be great to be in window mode, if and only if I am in debug mode, else it should be full screen.
For this I need to know if I am in debug mode or not. After reading this and this it seems like you can't check that easily, cause it depends on the VM you are using. Also it seems like the best solution is to use the Eclipse Debug/Run-Configuration and set a VM or program argument.
But how can I tell Eclipse to use this configuration only for debug mode? Or is there even a better way to determine, if debug is on or off?
It seems like the best way is to use arguments and pass them by using a Debug-Configuration and a Run-Configuration with the right values.
In Eclipse you have the possibility to add a Configuration to the Run list and the Debug list.
This can be done by going to the common tab inside the configurations and check the Debug and/or Run checkbox inside the "Display in favorite menu" section.
You can also edit the favorite list (add/remove/move entries) by clicking "Organize Favorites".
Note, that it does not prevent you from runing the Debug-Configuration or debuging the Run-Configuration.
I'm currently writing a pretty large program that calls the same methods from different places.
Now I would really like to see how the program goes from one method to another as it is running. Like a live view that shows when what method is opened (and why?). Call Hierarchy doesn't suit my needs at this point. Is there a way?
One way to follow the logic of your application is by placing breakpoints at the line of code you want your application to stop at but, to do this you'll have to setup it up in debug mode.
Every major IDE will let you do this, including Eclipse.
Have a look at this tutorial:
Java Debugging with Eclipse
Once you setup your program in debug mode you can add a breakpoint in the gutter next to the line numbers.
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?