Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Filter IncludesNew to Visual Studio Code? Get it now.
Filter Includes

Filter Includes

Stuart Geipel

|
2,244 installs
| (0) | Free
Filters unused includes from your source code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Filter Includes extension

This extension (marketplace link) is basically an automation of this SO answer from 10 years ago. It's probably a bad idea to use this thing.

Features

  • Automatically removes header files, keeps the ones necessary to compile!
  • Will remove anything you ask it to! (Code! Comments! Documentation!)
  • Remembers the previous command you used to build!
  • As fast as your build times!

How to use

  • Select some lines of text containing your includes
  • ctrl+shift+p, select "Filter Includes" command
  • It will prompt you for a build command, e.g. make.
  • Press enter - don't touch anything! It will try removing includes.

Tips

  • If it did break stuff, ctrl+z will work.
  • This uses your project as the current directory, so you might use cd build && make as your build command
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft