-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing numbers defined as hex in hexadecimal format, not just decimal #52
Comments
Cool idea. Thanks! |
I looked into this, and while it is possible to show both regular and hex representations of integers, VSCode will no longer highlight the original value as a number when I do (colored green in your screenshot, for instance). I think that it is critical to keep that color highlighting behavior for numeric values. One possible solution would be to add the hex representation to the variable's At this point, I'm probably not going to change anything, since there isn't a solution that I like. For my future reference, if I revisit this, I was able to change
|
Thanks for looking into this. I understand the concern about losing the green coloring. However I see the color coding as a way to easily visualize things in the debugger, and showing hex numbers in hex format would probably provide more value than color coding, given that showing dec and hex next to each other make those numbers stand out from the rest. Also the time saved by not having to manually convert the numbers probably outweighs the cons. If you are not convinced by that, I found that from version 1.50, VS Code added functionality that enables debug extensions to implement data formats for variables. It's explained here https://code.visualstudio.com/updates/v1_49#_contributable-context-menu-for-variables-view So you could add a context menu on the debug values to show them in different formats. I still like showing both dec and hex directly as it saves time, but the context menu solution is good too. Let me know what you think. |
Hello @joshtynjala, just a friendly reminder, in case you have given some thought about adding the context menu option to the debugger, to see variables in different formats, as suggested in the link I sent. So when we right click on a variable like this: Thanks for your help! |
Hello,
I was debugging some AS3 code, and I noticed that some variables that have a number in them, which was set in hex format, is shown as decimal in the debugger. As an example, I have this:
public static const STATE2:uint = 0xae03c339;
...
var gameState:uint = STATE2;
In VS Code this would look like this:
In FlashDevelop and IntelliJ IDEA it shows it in both dec and hex:
I think it would be very useful to show those variables in both dec and hex, to avoid having to go to an external number converter. Thanks!
The text was updated successfully, but these errors were encountered: