Installing the extension
First, install the Makefile Tools extension from the VS Code Marketplace.
Activating the extension
Once the extension is installed, it will activate when it finds a Makefile in your project’s root folder. If your project’s Makefile is not in the root folder, you can use the Makefile Path setting to instruct the extension where to find it. Update Makefile Path by going to File > Preferences > Settings and then selecting makefile under Extensions.
Configuring your project
By default, the extension will attempt to use a make program that resides within your $PATH to configure the project. If your make.exe is not in your $PATH, update the Make Path setting by going to File > Preferences > Settings and then selecting makefile under Extensions. The Make Path setting tells the extension where to find your make executable.

"makefile.configurations": [ { "name": "littlekernel", "makeArgs": ["PROJECT=armemu-test"] } ]To choose the configuration for a project, select the Makefile Tools icon in the left explorer menu.


Building targets
After configuring your project, you’re ready to build. Choose a Build target by selecting the pencil icon that appears on hover.


Debugging and running targets
To run/debug your program, use the pencil icon to select a Launch target. A configuration for the selected target will be added to the makefile.launchConfigurations setting. If you need to pass additional arguments to your targets—things like MIMode, miDebuggerPath, stopAtEntry— add the binaryArgs property to the target’s configuration in makefile.launchConfigurations.


Makefile Tools commands
You can find all the Makefile Tools commands by opening the Command Palette and typing "makefile". For your convenience, there are commands for building clean and building ALL that you can run without changing the Build target.
Makefile Tools settings
To find all Makefile Tools settings, go to File > Preferences > Settings and then select makefile under Extensions. The settings you’ll probably use the most are:- configurations (tells the extension which arguments to pass to make when configuring your project)
- defaultLaunchConfiguration (global debugger settings)
- launchConfigurations (debugger settings for specific launch targets)
- makePath (path to your make executable)
- makefilePath (path to project’s Makefile)
- buildLog (alternative to dry-run)
Known limitations
This is a preview release of Makefile Tools, and although we’ve tested it with over 70 repositories, you may need to do some fiddling to configure your project for the first time. Please feel free to submit a PR to this document, adding your repository and its correct configuration settings, to help anyone who might be trying to build the same project. Check out our troubleshooting guide for a list of known limitations and work-arounds.What do you think?
Download the Makefile Tools extension for Visual Studio Code today, give it a try, and let us know what you think. If you run into any issues, or have any suggestions, please report them in the Issues section of our GitHub repository. We can be reached via the comments below or in email at visualcpp@microsoft.com. You can also find our team on Twitter at @VisualC.Read more here: https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code
Content Attribution
This content was originally published by Julia Reid at Microsoft Developer Blogs, and is syndicated here via their RSS feed. You can read the original post over there.