Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Gcc stack usageNew to Visual Studio Code? Get it now.
Gcc stack usage

Gcc stack usage

Wibren Wiersma

|
6,716 installs
| (2) | Free
Show gcc stack usage analysis for functions in VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gcc stack usage

Compile your code with -fstack-usage, after that run the reload su files command in vscode.

FAQ

Stack usage not shown above function

Possible reasons:

  1. The vscode extension cannot map the output of gcc to the correct file.
  2. The function is inlined by the compiler. Compile again by forcing not to inline the function with __attribute__ ((noinline)).

Known issues

Here are some known issues and workarounds.

Duplicate filenames

Gcc does not output the full file path, only filenames. So if your workspace contains multiple files with the same filename, the extension might show information for other same named files there as well...

Stack usage for files in .gitignore

VSCode by default does not allow searching for files that are listed as ignored. But these files my have stack usage information. When pressing on an item in the global stack usage view, that refers to a ignored file, VSCode is not likely to redirect you to the file. Instead the filename, row and column information is shown, and you should open the file manualy. While the file is open, VSCode is able to find it, so when pressing again you should be redirected correctly.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft