Question

Question: How can I change values in the Eclipse debugger as hexadecimal values?

Background: The Eclipse Expressions window is driving me a little crazy. It permits me to type a new value directly in the window, but then ignores it. I have to right-click, select change value, and then type the new value in the little popup window. Annoying, but survivable.

But then the new value isn't displayed unless I refresh the Expressions window using F5. Another layer of weirdness, but OK....

I'm working with byte arrays and need to manually enter some test values. When using the popup window described above, it insists that the value be a "valid byte value" and apparently also demands that I use decimal. My test values are all in hex, so I have to manually convert them to decimal. Even more annoying, but again survivable. I can always translate my hex values into decimal, right?

The final straw is that due to Java's incredibly stupid (sorry, but it really IS stupid) lack of support for unsigned variables, I cannot enter values above 127 in that Expressions window without using negative decimal values!

This is frankly ridiculous... I have hex data, but I have to treat it as something completely and totally different just to satisfy Eclipse.

I have found how to cause the Expressions window to display the values in hex, but that does not seem to make it accept typed hex values. I have tried typing the values in pure hex ("BD"), with the Java-accepted prefix ("0xBD"), with the old-style suffix ("BDh"), but nothing works.

So... How can I change values in the Eclipse debugger as the hexadecimal values that they really are?

Thanks!

Was it helpful?

Solution

Are you sure you are talking about the Expressions Window and not the Variables Window?

I can confirm that in my Eclipse installation it is possible to change values of variables in the Variables window by just clicking on the value and editing it. It is also possible to enter hexadeximal numbers by using "0x" as a prefix.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top