You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type: LanguageService
I was recently exposed to an IDE which displays the size of a type (also structs and classes) or variable when hovering over the semantic object. So basically it just shows the number sizeof(type) would give you. It proved to be very handy when optimizing for memory usage and working with bit fields.
Here is a simple mock-up I made:
I was originally trying to implement such a feature as a standalone extension but came to the conclusion that this would probably need to be included into cpptools itself.
Also thank you for working on this awesome extension!
The IDE I used was Qt Creator. I also know of other users who are currently missing such a feature in IntelliSense. Hopefully the suggestion on visualstudio.com will gain some traction.
heartacker AI has to have all the definitions that make up the type/variable (unless somehow you use AI in agent mode to locate all the symbols making up the type/variable on its own). IntelliSense has that type info, but it also has the sizes too, so it doesn't really make sense to send AI the type info and ask AI the size when we could just send/show the size ourselves.
Activity
sean-mcmanus commentedon Nov 6, 2020
Which IDE?
This issue is being tracked in VS by https://developercommunity2.visualstudio.com/t/shIntellisensesh-improvement:-Show-/848297?entry=suggestion . It probably needs more upvotes.
UPDATE: You can also just update this GitHub issue.
Myzhe commentedon Nov 6, 2020
The IDE I used was Qt Creator. I also know of other users who are currently missing such a feature in IntelliSense. Hopefully the suggestion on visualstudio.com will gain some traction.
KaungZawHtet commentedon Nov 6, 2020
+1 to quick type info display
sean-mcmanus commentedon Nov 7, 2020
Kaung Zaw Htet (@KaungZawHtet) FYI, we use the thumbs up to tracking +1 upvotes:

pansila commentedon Jun 1, 2021
Upvoted +1, our team really need this feature.
DolphinIQ commentedon Dec 9, 2024
Same, would be great to have it in VSCode
FrancisElric commentedon Dec 10, 2024
Same here, would love to have this in VSCode
heartacker commentedon Apr 23, 2025
let ai make it happened.please
sean-mcmanus commentedon Apr 24, 2025
heartacker AI has to have all the definitions that make up the type/variable (unless somehow you use AI in agent mode to locate all the symbols making up the type/variable on its own). IntelliSense has that type info, but it also has the sizes too, so it doesn't really make sense to send AI the type info and ask AI the size when we could just send/show the size ourselves.
MaximeEngel commentedon Dec 16, 2025
Also Need this, this lack of feature is one of the major argument of my coworkers than VSCode is not a good option for C++
rmarker commentedon Dec 17, 2025
This would be very useful.
Even better if it matched Visual Studio's Memory Layout feature to be able to dive deeper.
https://devblogs.microsoft.com/visualstudio/size-alignment-and-memory-layout-insights-for-c-classes-structs-and-unions/
Colengms commentedon Sep 29, 2026
The on-hover size/alignment changes should be in 1.35.3, tracked by: #13034
Closing this as a duplicate. I've moved the Memory Layout feature request into its own issue: #14805