Developing Renode

Renode has many built-in features to enable debugging of embedded software, e.g. debugging with GDB, but sometimes you might be interested in debugging Renode itself, especially if you are involved in its development

VS Code configurations

Visual Studio Code’s extensive plugin ecosystem provides a good developer experience for working with the Renode codebase. You may decide to use either the official VS Code app from Microsoft or use one of the OSS binary releases VSCodium or code-server. The main difference between the official and OSS releases is that they use different extensions gallery, so some extensions may be unavailable for each version.

When launching Renode in VS Code, you can use several ready-to-use configurations (as defined in the launch.json file):

  • Launch (console) - launches a previously built Renode under the .NET debugger.

  • Attach - attaches the .NET debugger to a running Renode instance.

  • (gdb) Tlib Attach - required to connect to a previously launched instance of Renode via GDB to debug translation libraries (implementation of emulated cores).

The workspace also provides build tasks (as defined in the tasks.json file):

  • Build - Debug - equivalent to running ./build.sh -d from the console.

  • Build - Release - equivalent to running ./build.sh from the console.

These configurations require the following VS Code extensions:

Debugging C# code

By following the steps below, you will be able to add regular breakpoints in Renode’s C# code.

  1. Build Renode in debug configuration (or use the Build - Debug task in VS Code).

    ./build.sh -d
    
  2. Use the Launch (console) configuration.

  3. When Renode starts, you can set breakpoints and debug C# code as usual.

Debugging C code (translation libraries)

To debug the C implementation of emulated cores, follow the steps below.

  1. Build Renode in debug configuration (or use the Build - Debug task in VS Code).

    ./build.sh -d
    
  2. Launch Renode with the debug flag enabled.

    ./renode -d
    
  3. When Renode starts, load the platform with a CPU whose code you wish to debug.

  4. Use the (gdb) Tlib Attach configuration to connect with GDB.

  5. Once started, a popup will appear. In the popup, type in Renode.dll.

  6. From the drop-down list, select the option ending with Renode.dll, as highlighted in the screenshot below.

VSCode .NET drop-down list

Figure 1 VSCode .NET drop-down list

Debugging with GDB

To start debugging Renode and its components using GDB, follow these steps:

  1. Build Renode in debug configuration.

    ./build.sh -d
    
  2. Launch Renode with the debug flag enabled.

    ./renode -d
    
  3. Attach GDB to a running Renode process to debug implementation of cores (in C via GDB).

Useful VS Code extensions

Below, you can find a list of VS Code extensions that may prove useful when working with Renode:

Note

Some of these extensions may require additional configuration depending on your machine’s setup. Tlib should be first built with CMake to generate the compile_commands.json file for clangd language services.


Last update: 2026-05-21