Skip to content

NBCppDevelopment notes

Development notes

How NBCpp chooses a compiler, attaches the debugger and verifies a release.

Extension commands and VS Code configuration

F5 is the default debug shortcut in VS Code. Version 1.5.0 connected it to NBCpp on first use in a new workspace. NBCpp determines the language of the active file and asks VS Code to run the corresponding build task. Smart Run and both language-specific commands remain available.

User-edited settings are preserved in existing workspaces. NBCpp can recognize an older generated configuration and repair an obsolete path to the bundled compiler.

The LLVM and LLDB toolchain

NBCpp checks for GNU, Clang and MSVC in parallel. The first session can start as soon as the tools needed by the active language are available. After detection finishes, later sessions can use a higher-priority complete toolchain.

On Windows x64 without the Microsoft C/C++ extension, a native launcher starts the program in the VS Code integrated terminal. The bundled LLDB debugger then attaches, and the program can read terminal input. This removes the old PowerShell startup, on-the-fly C# compilation and polling for a process ID file.

The Windows x64 bundle includes Clang, Clang++, LLD and the LLDB debug adapter, all at version 21.1.8. In the 1.5.0 VSIX, the toolchain files take up 48.82 MiB compressed and 169.06 MiB unpacked. The full extension package is 49.45 MiB. The bundled tools can compile, link and run C17 and C++17 examples on their own.

Packaging and extension host tests

Version 1.5.0 passed 16 tests in each of two isolated VS Code extension hosts, 1.143.1 and 1.147.0. Coverage included first-run F5, source breakpoints, terminal input, stepping, restarting and recompiling after stopping.

The 1.5.1 changes cover the English and Chinese user guides, developer notes and toolchain build instructions. The debugger implementation is the same as in 1.5.0.