

VS Code provides a feature, Tasks, to integrate with external tools, including Make.įirst, type Ctrl+Shift+P to enable Command Palette and type tasks, Command Palette displays a list of available commands that we can execute from here.

$(RM) $(BUILDDIR)/*.d $(BUILDDIR)/*.o $(LIBQUICKSTART_FNAME) $(TEST_FNAME) $(TEST_FNAME): $(TESTOBJS) $(LIBQUICKSTART_FNAME) LDFLAGS += $(LIBQUICKSTART_FNAME) -lboost_unit_test_frameworkĪll: $(LIBQUICKSTART_FNAME) $(TEST_FNAME) LIBQUICKSTART_FNAME = $(BUILDDIR)/libQuickStart.a TESTOBJS = $(addprefix $(BUILDDIR)/, $(patsubst %.cpp, %.o, $(notdir $(wildcard $(TESTDIR)/*.cpp)))) This section demonstrates how to configure VS Code to build the code with GNU Make.Īssume there is a Makefile in QuickStart Project, and the hierarchy is as the following. Build with MakeĪlthough CMake is easier to use than GNU Make, GNU Make is used by many people. Now, Visual Studio Code is ready to debug. deb package (code_1.30.2-1546901646_b).įind_package(Boost REQUIRED COMPONENTS unit_test_framework)

It took me a while to figure out how to configure VS Code to work with C++ in Linux. However, most of these documents are written for the general purpose of Visual Studio Code. Microsoft has posted a lot of fantastic documents of Visual Studio Code. VS Code also becomes my favorite editor for Windows and Linux. In 2018, it has become the most popular editor. It supports several programming languages and many features to help programmers. About a couple of years ago, Microsoft introduced a brand new cross-platform code editor called Visual Studio Code (VS Code) which is a lightweight and cross-platform version of Visual Studio. I have used many IDEs and editors to write the code for many years. As a software engineer, a great editor or IDE helps improve productivity.
