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
After getting syntax highlighting all setup and working, I noticed that there was not a way to visually ensure that a variable was used or unused. There are other ways to accomplish this, but it would be nice to get a heads up from the syntax highlighting that a variable is never used. Similar to what happens when using an #ifdef block:
Is this possible? Or is the static analysis to ensure an unused variable beyond the scope of the extension?
Thank for providing this request! We will look into implementing your feature request in the future. For now, please track this issue for further updates. Considering we have a backlog of feature requests; we will consider this request based on priority. If you would like us to address this issue faster, having more users upvote the issue usually helps.
This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.
Activity
browntarik commentedon Feb 9, 2023
Thank for providing this request! We will look into implementing your feature request in the future. For now, please track this issue for further updates. Considering we have a backlog of feature requests; we will consider this request based on priority. If you would like us to address this issue faster, having more users upvote the issue usually helps.
github-actions commentedon Apr 11, 2023
This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.
github-actions commentedon May 25, 2023
This feature request has received enough votes to be added to our backlog.
haoenz commentedon Jul 13, 2023
Because of the lack of this feature, someone suggested that I should give up using VSCode and turn to other real IDEs…
sean-mcmanus commentedon Jul 13, 2023
Haoen Zhang (@haoenz) Which IDE?
haoenz commentedon Jul 13, 2023
If I remember correctly, he recommended CLion. But I haven't tried it yet.
starball5 commentedon Aug 7, 2023
Historically related: #6588, but closed pointing to problem matchers for build tasks.
Related on Stack Overflow: How can I dim out unused C++ variables in VS Code?
Related on r/vscode: How to enable C++ unused variables gray out?
AlefCS commentedon Oct 7, 2024
It would also be nice to have this kind of feature for unused headers.
sean-mcmanus commentedon Sep 22, 2026
Cameron Blegen (@cbleg98) Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.35.2 .