TraceExporter for VS Code

Feb 6, 2026

Percepio TraceExporter for VS Code makes it easy to export Percepio TraceRecorder snapshots during your debug session and open them directly in Percepio Tracealyzer. This is applicable for embedded systems based on Zephyr, FreeRTOS, SafeRTOS, Cesium, ThreadX or PX5, or using TraceRecorder’s “Bare Metal” option. The extension is currently provided in a Beta version as a downloadable .vsix file.

Download it here: percepio-traceexporter-0.2.7.vsix

The Beta has been tested with Nordic nRF Connect for VS Code, but should work in most gcc-based VS Code environments. Please try it out! We appreciate all feedback.

Prerequisites

  • VS Code with GCC-based development tools including debug support (GDB-based)
  • Percepio TraceRecorder in your build, configured for snapshots using the RingBuffer streamport.

Learn more in the Getting Started Guide for your RTOS.

Usage

1. To install the extension, open the Extensions panel in VS Code and then the “…” menu, where you select “Install from VSIX…”. Select the downloaded extension file.

2. Locate Percepio TraceExporter in the Extensions list and select Settings (under the gear icon). Update “Tracealyzer Path” with the path to your Tracealyzer (or Percepio View) executable. On Windows this should point to “Tracealyzer.exe”, on Linux to “launch-tz.sh” in the Tracealyzer folder. By default, the other settings should be as below.

TraceExporter for VS Code settings

3. Open the TraceExporter from the Command Palette by typing “>” and selecting “Percepio TraceExporter: Open”.

Open TraceExporter in VS Code

4. Start a debug session and put a break point at a relevant location, or just halt at a random location (after xTraceEnable() has been executed). Click Save Trace to store the trace file. The full path is then displayed, based on the gdb working directory. Click Launch Tracealyzer to view the trace.

Percepio TraceExporter for VS Code

Note that clicking “Save Trace” again will overwrite the same file, so make sure to change the output filename if you want to keep the previous trace.  Otherwise, if you choose to overwrite the file, you don’t need to click “Launch Tracealyzer” again. Tracealyzer will detect the updated file and ask if to reload it.

Troubleshooting
We believe this extension should work with most VS Code extensions for embedded debugging. However, it relies on running a GDB command (dump) and the syntax for running GDB commands from VS Code (e.g. in the Debug Console) differs depending on the debug tools used. It seems the most common is “-exec command”, but the prefix “>” has also been observed. Currently Percepio TraceExporter supports these two syntaxes and auto-detects which one that works. But If you get an error message like “Cannot evaluate expression on the specified stack frame”, it is probably because your VS Code setup requires a different syntax for running gdb commands. In that case, please investigate what prefix that is needed to run a gdb command in the Debug Console (for example “show version”). You can then apply the right prefix in “Override gdb prefix” text field as a temporary workaround. Then make sure to let us know so we can add support for your debugging environment.

TraceExporter for VS Code: Option for using custom GDB command prefix