CLion Tutorial – Boost.Test

CLion Tutorial - Boost.Test

Boost unit testing framework (Boost.Test) is part of the Boost library. It is a fully-featured and extensible framework with various assertion macros, XML output, and more. Boost.Test itself does not include mocking capabilities but can be used in conjunction with standalone mocking frameworks (like gmock). If you are not familiar with Boost.Test, here is a … Read more

CLion Unit Testing Tutorial

CLion Unit Testing Tutorial

This tutorial provides an overview of unit testing methods and discusses the four testing frameworks supported by CLion: Google Test, Boost.Test, Catch2, and Doctest. Unit Testing Basics Unit tests are designed to check individual units of source code separately. Here, a "unit" refers to the smallest part of code that can be tested independently, such … Read more

CLion Tutorial – Hex View & Mute Variables

CLion Tutorial - Hex View & Mute Variables

Hex View For integer type numeric variables, you can view the hexadecimal representation instead of or alongside the original format. The hexadecimal view for integer types is supported by GDB and LLDB debuggers on all platforms, including remote debugging and WSL scenarios. To enable the hexadecimal view, go to Settings | Build, Execution, Deployment | … Read more

CLion Tutorial – Peripheral View

CLion Tutorial - Peripheral View

During a debugging session, you can monitor the registers and peripherals defined in the .svd file. The Peripheral View is applicable to two configuration types: Embedded GDB Server and OpenOCD Download & Run. Configure the Peripheral View by setting up the Embedded GDB Server or OpenOCD Download & Run configuration, and start the debugging session. … Read more

CLion Tutorial – Remote Debugging Configuration

CLion Tutorial - Remote Debugging Configuration

Local Operating System: macOS / Linux / Windows for GDB, macOS / Linux for LLDB Remote Operating System: Any operating system supporting gdbserver for GDB, macOS / Linux or other operating systems supporting lldb-server for LLDB Required Tools: gdbserver or lldb-server on the target machine Binary and Symbol File Synchronization: Manual Client Debugger: Bundled GDB … Read more

Summary of Remote Development Options in CLion

Summary of Remote Development Options in CLion

CLion has several remote development options, each tailored to specific setups: Remote development using JetBrains Gateway Remote development with local sources WSL2 Docker (running locally) Two variants of gdbserver/lldb-server debugging: remote debugging (GDB/LLDB) and remote GDB server (GDB only). The following is a summary of the remote development options, which can be decided based on … Read more

CLion Tutorial – Debugger Console & Attach to Process

CLion Tutorial - Debugger Console & Attach to Process

The debugger console allows you to directly access the GDB/LLDB console from CLion during a debugging session. The debugger console is only available when the program is paused. Open the tab marked LLDB or GDB in the debugging tool window: This tab shows the debugger's output/error stream and allows you to run GDB/LLDB commands. 👇 … Read more

CLion Tutorial – Embedded GDB Server

CLion Tutorial - Embedded GDB Server

Operating System: Windows (MinGW or MinGW-w64) / Linux / macOS Required Tools: Debug probe with software, cross-compiler toolchain Build Targets: CMake / Makefile / Custom build targets To debug on the chip, you need to create a special run/debug configuration. In CLion, you can quickly create the following GDB server configurations using the "New Embedded … Read more

CLion Tutorial – Remote GDB Server Configuration

CLion Tutorial - Remote GDB Server Configuration

Local Operating System: macOS / Linux / Windows Remote Operating System: Any system that supports gdbserver, SSH, and SFTP Required Tools: gdbserver on the target machine Binary File Synchronization: Automatic Client Debugger: Bundled GDB / GDB from Toolchain / Custom GDB Build Targets: CMake / Makefile / Custom Build Targets Configuring the Remote GDB server … Read more

CLion Tutorial: Code Coverage

CLion Tutorial: Code Coverage

Operating System: Linux / macOS / Windows Project Format: CMake Management Suite: Run | Manage Coverage Reports Ctrl+Alt+F6 Coverage Settings: Settings Ctrl+Alt+S | Build, Execution, Deployment | Coverage In CLion, you can run CMake applications and tests with code coverage measurement. The code coverage results provide the percentage of code lines executed during runtime and … Read more