Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Setting Up Your Environment  ›  Lesson

Code Editors and IDEs

Code Editors / IDEs 12 minA code editor is where you write C++, an IDE adds building, running and debugging in one place, and both rely on a compiler underneath.

Code Editors and IDEs

You have a compiler. Now you need somewhere comfortable to write Rocket Run. The choices seem endless and people argue about them loudly, but they all fit into two groups, and every one of them relies on the compiler you just installed.

The rule

An editor writes code; an IDE also builds, runs and debugs it.

An editor is a tool for writing and changing text, with helpers like syntax colours. An IDE (integrated development environment) bundles editing with building, running and a debugger, usually set up for you.

Common choices:

Tool Type Notes
Visual Studio IDE Windows; ships with the MSVC compiler
CLion IDE Every platform; organises projects with CMake
Xcode IDE macOS; uses Apple Clang
Qt Creator IDE Every platform; free
VS Code Editor Add the C/C++ or clangd extension
Vim, Neovim, Emacs Editor Add clangd for smart features

What turns a plain editor into a smart one is a language server. For C++ the popular one is clangd. It reads your code the way a compiler would and feeds the editor completions, go-to-definition and red squiggles for errors while you type.

Underneath all of them sits a compiler. Pressing the green Run button in any tool simply runs a command like this for you:

g++ -std=c++20 -g rocket.cpp -o rocket && ./rocket

The shortcut

List the three pieces you need and check which one your tool is missing: editor, compiler, debugger.

Setting up VS Code for Rocket RunStep 1 of 4
  1. Editor

    VS Code is installed. That covers writing text, and nothing more.

The trap is blaming the editor for a missing compiler. If Run fails with "g++ not found", no editor setting will fix it; install the compiler.

Drills

Answer fast — trust the rule.

quick drill

You installed only VS Code, and pressing Run says g++ not found. Why?

quick drill

What does clangd give an editor?

quick drill

Which of these is an IDE that installs its own C++ compiler on Windows?

quick drill

One teammate uses CLion, another uses Neovim. Can they work on the same Rocket Run code?

Remember

  • An editor writes code; an IDE also builds, runs and debugs it.
  • Shortcut: check you have an editor, a compiler and a debugger.
  • Trap: a Run button is only a shortcut for a compiler command.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainChoosing a setup

Two Rocket Run teammates argue: one uses CLion, the other uses Neovim with clangd, and each says the other cannot work on the project. Explain the difference between an editor and an IDE, what clangd adds, and why both can work on the same code.