I am running Eclipse Galileo for developers.
When I run in debug mode, the current variables and their values are not coming up in the Variables window. The window remains empty when I step through my code after a breakpoint.
Last night it was working, so I'm perplexed. Any reason why this might be happening and any tip on troubleshooting?
I ended up trying something easy by resetting the Debug perspective, which seemed to work:
Window => Perspective => Reset Perspective...
Thanks for the comments.
Window --> Show View --> Variables
My problem was that I couldn't see variables names, but just the value. After trying quite a while I got the solution: Click on the down arrow (in degub Variables tab) --> Layout --> show columns
It did the trick!
Resetting the perspective wasn't quite enough for me, I had to first delete the "Variables" tab and then reset the perspective (which reinstated the Variables tab in a working state). One other thing not mentioned above which might help others - when the variables tab is not working, the tab title is in italics (whatever that signifies). When it's working it goes back to normal font.
I restarted Eclipse and it worked again.
Windows -- > showView --> variable
or you can reset the perspective
windows -- > preferences -- > perspective --> restore Defaults
try a right click on the variable and select inspect, then it should come up in a popup window
I found I needed to remove static declarations if I wanted to see the variables, but this works better...
Modify/view static variables while debugging in Eclipse
What worked for me is the following: I had a blank Variables view for the top stack frame. I selected a lower stack frame, then reselected the top one, and the Variables view refreshed itself somehow. Note: I'm using Eclipse Mars, so this bug appears to have returned in this version (or perhaps it's a different one, with the same symptoms?).
Go to Eclipse Menu --> Window ==> Show View ==> Variables
This should bring back your variables window in eclipse
In my case, the variable didn't show up because in the settings of the debuger (in my case xdebug) I changed Max children / max data / max array depth to big values ... I reset the config and it worked
If you are able to jump on breakpoints, it is ok to Reset Perspective.
On Eclipse Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600 I notived that not only the Variable View was empty, but also the buttons to navigate the execution (F5, F6, F8 functionality buttons) were disabled. In this case, go to Debug View, right click to the row with the yellow pause symbol, and choose an option like "Resume". On the next breakpoint, Variable View will be automagically fullfilled and execution navigation buttons will be enabled. Can't explain why
Also: your process needs to be suspended for Eclipse to show variables. If it is running, Eclipse won't show any variable.
To suspend a thread, select a thread in the "debug" view, and hit "Suspend"
Did not find a solution after trying the above answers - Maybe this is very specific to my case - Solution was to ensure that the option "Skip All Breakpoints" is not enabled in Eclipse Run - > Skip All Breakpoints (ctl-alt-B) (toggle)
It's possible your Java compiler is configured not to preserve variable information. Right-click on the project in Project Explorer, then select Properties > Java Compiler > Add variable attributes to generated class files (used by the debugger). Without this option set, you will only see fields in the Variables view, not local variables.
I was running into this problem because eclipse thinks that the code that is executing is commented out. There is an #ifndef wrapper, and the condition evaluates to false in part of the project. Unfortunately, CDT wasn't quite smart enough (Helios or Keppler) to realize that it's not always false, and when stepping through that portion of the code, the variables window doesn't work. I can still inspect individual variable values.
I had the same issue and after I installed MinGW I could see the variables.
I used Fender's style above, but selected to "Watch" a variable. Once in the Expressions tab, I just moved over to the Variables tab and Voila - variables back in business.
None of the solutions worked for me. What solved my problem was under the drop down arrow in the Variable window. On the Layout option, I had to choose "Variables View Only" and then I could see the variable's values again.
This problem also suddenly appear out of nowhere. One moment Debug was working and the next it wasn't.
I too have this problem: EclipseNeon + Tomcat8 doesn't show all the variables when in debug mode. I've tried above suggestions without success. Then I have debugged the same web project with NetBeans8 + GlassFish4 and all the variables are listed with values. Then I have debugged the same web project with NetBeans8 + Tomcat8 and not all the variables are listed. Then I've installed GlassFish4 for EclipseNeon and, debugging the same web project, all the variables are listed with values. So, the problem is in Tomcat8. A note: run Eclipse as administrator to install GlassFish4; with NetBeans is easier to install other servers.
My prbolem was that i used OpenMP, i disabled OpenMP then local variables appeared.
Resetting the view and re opening Eclipse did not help me, but this worked for me:
click on the arrow down button in the Variables window -> Layout -> Select Columns -> Check whichever columns you want.
Even though I already had both 'name' and 'value' checked, i unselected and selected them again, clicked 'OK' and the column appeared.
https://i.stack.imgur.com/aI93A.png
Like with every bad software the treatment for this wrong behaivier does not exist. What is good for one does not work for others.
I let the debuger to stop on a brakepoint once, then again second time and on the third time the beast has shown the Variable View with all data in it.
Assuming you have your debug view just how you like it and don't want to have to reset it everytime this bug appears, try this. This assumes your "Debug View" has both "Expressions" and "Variables" views open.
Double-Click the Expressions tab (the actual tab with the text, not the 'window bar'). This will maximise it. Repeat to restore it to previous size/location. That should reset everything except Expressions. Repeat for the variables tab and it will reset expressions.
This worked for me on Windows 10 with Eclipse: Version: 2018-09 (4.9.0) Build id: 20180917-1800 Java: jdk1.8.0_171
Most often you would have imported multiple eclipse projects and you have switched between Git Branch. And then, you build and import incorrect project where debugger is not expected to come!
If reset eclipse Perspective doesn't worked. Then do following things :
Delete eclipse project from disk. Clean and Build the eclipse project (In my case I used ANT tool). Note: Verify whether your are building the project in which the debugger is expected to come. The correct project name to be built can be found by hovering over a file where debug point is set. Import that eclipse project again. Also, Verify whether correct JDK is being selected at Preferences -> Installed JREs
Nothing above worked for me. What did work was this (from menu) :
Window -> Perspective -> Close Perspective
then
Window -> Perspective -> Open Perspective -> Debug
There could be different reasons. For my cases, variable value showing had been working for long time. Then one day, it just stopped working in same line of code. I found out the culprit was that aborted but still hanging JUnit test threads holding on Windows file resources. After closing all Windows applications(including Eclipse), I found there were a couple of directories (under JUnit test resource directory) which I can't delete because some files there were locked for unknown reason. So I tried a Windows reboot which fixed the Eclipse debug issue.
For me the solution of the problem was to configure xdebug properly. I added in the php.ini this lines of code :
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.show_local_vars = 1
The important part I was missing : xdebug.remote_enable = 1
If you are looking for a "live view of the object your are working with " when you hover over and all you see is the name make sure you place a break point on the method you are testing on. Otherwise when you hover over you will only get the method name.
Anyways I hope this helps someone. I tried all the above steps which are great! but I still could not view the object I was working with live. It may just be rookie mistake.
Best of luck!
Success story sharing