Skip to content

C/C++ struct/class memory size and alignment #13034

Open

Description

@DolphinIQ

Feature Request

Visual Studio has this nice feature, which on struct/class hover shows a tooltip displaying it's memory size and alignment in bytes:

Image

Can this be enabled in the VSCode official Microsoft Extension Pack?

Activity

  1. Colengms commented on Dec 9, 2024

    @Colengms
    Contributor

    Hi Dolphin (@DolphinIQ) . Thank you for this feature request. We prioritize feature requests based on up-votes (relative to other feature requests).

  2. sean-mcmanus commented on Dec 9, 2024

    @sean-mcmanus
    Contributor

    FYI, there's a pre-existing issue from 2020 with 20 upvotes at #6460 . It doesn't mention showing alignment info though.

  3. White-Owl commented on Apr 24, 2025

    @White-Owl

    My additional request is that, I would like to see member offsets and padding gaps in the struct.
    And yes, the request is for VSCode, for C/C++ extension.

  4. The-Dumb-Dino commented on Jan 10, 2026

    @The-Dumb-Dino

    Would be very beneficial, especially when reverse engineering c/c++ code

  5. lexcibien commented on Mar 23, 2026

    @lexcibien

    I use cpptools for embedded systems, and IMO can be so much pleasure to work with that for measur/debug Wifi and RFID packets.

  6. moved this from Pull Request to Done in cpptoolson Sep 29, 2026
  7. lexcibien commented on Oct 7, 2026

    @lexcibien

    Heheey, that's pretty good, may i have an suggestion to it? Could it be typed 1 "byte" / 2 "bytes" instead of a single "B"? Anyone else agree?

  8. sean-mcmanus commented on Oct 7, 2026

    @sean-mcmanus
    Contributor

    Alex Luiz (@lexcibien) I think the problem with "byte" was some languages have up to 3 different translations depending on the value.

  9. lexcibien commented on Oct 13, 2026

    @lexcibien

    The term "byte" is used globally and is not translated into other languages due to strict international standards:

    • ISO/IEC 2382: This standard defines universal IT terminology (originally in English and French) specifically designed to be adopted directly into other languages without literal translation.
    • IEC 80000-13: This document officially standardizes the unit "byte" and establishes its international symbol as a capital B (while a bit uses a lowercase b).
    • The "Octet" Alternative: For languages that avoid English loanwords (like French), these same standards approved the term octet, which means a group of exactly 8 bits. This is also heavily used in global networking protocols.
  10. lexcibien commented on Oct 13, 2026

    @lexcibien

    Here in Brazil, we tend to use a lot of english words for things related to technology and engineering, just as Japan does.

  11. sean-mcmanus commented on Oct 13, 2026

    @sean-mcmanus
    Contributor

    Alex Luiz (@lexcibien) The handling of plural nouns is different for different languages -- the ISO/IEC 2382 does not eliminate normal grammatical pluralization in localized UI -- it standardizes terms and concepts.

  12. lexcibien commented on Oct 13, 2026

    @lexcibien

    Okay, i'm sure you got way more points to tell me it's better B than byte or bytes, but seriously, why not to go with many other tools already do. I got confused as i look into a different way to show the same information on different extensions. Practically, a non english user would get confused with an acronym instead of the whole word untranslated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Feature RequestLanguage ServiceWorks in VSSo we'd need to fix it for VS Code to reach parity.fixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions