IAR C-SPY Debugger
Part of IAR Platform
IAR C-SPY shows you what your system is doing, and when. Use breakpoints and stepping to inspect your code, and use trace and the timeline to catch the bugs that disappear when the CPU stops.
Key Benefits
C-SPY gives you control over your code and visibility into the running system, in one debugger.
- See the System
- RTOS-Aware Debugging
- Debug Without Stopping the Target
- One Debugger on Linux and Windows
See the System, Not Only the Code
A breakpoint stops the CPU, but peripherals, DMA, and interrupts keep going, so timing bugs often vanish the moment you look. C-SPY records interrupts, RTOS task switches, software events, data logs, and, with a suitable probe, power measurements on one timeline while the application runs at full speed.
RTOS-Aware Debugging
Raw memory does not tell you why a task is waiting. With RTOS awareness, C-SPY shows tasks, queues, semaphores, and mailboxes, and supports task-specific breakpoints and stepping. Thread state, priority, and stack usage sit next to the trace, so you can see when a task was ready but never running.
Debug Without Stopping the Target
Attach to an application that is already running, without a reset or a download, and record what happens next. A rig that fails every few hours keeps its state. Attaching depends on the driver and device, and C-SPY tells you when it is not supported.
One Debugger on Linux and Windows
The IAR cross-platform IDE brings the same C-SPY experience to Linux and Windows: RTOS awareness, timeline analysis, profiling, power monitoring, and trace. Teams can use one debugging workflow on workstations, in containers, and in the lab, without a Windows virtual machine kept around for the debugger.
Features
C-SPY combines everyday source-level debugging with trace, profiling, and automation, inside the IDE and from the command line.
Integrated in IAR Embedded Workbench
C-SPY is part of the IDE, so you edit, build, and debug in one place. Fix code in the window you are debugging in, set breakpoints at any point in the development cycle, and keep watch properties, window layouts, and register groups between sessions. Switch between C, C++, and assembler source and disassembly as needed.
Command-Line and CI Support
Run C-SPY from the command line with cspybat for batch runs, including attach to a running target. With IAR Build Tools available as container images, the same environment runs on a developer desktop and in automated test pipelines on Linux and Windows.
Stepping and Breakpoints
Every statement and function call is a step point, including calls inside expressions and parameter lists, which helps when you debug C++ constructors. Code and data breakpoints show whether your logic is right and how and when data changes. Macros automate complex sets of actions.
Variable and Memory Inspection
Monitor variables and expressions continuously or on demand. View STL lists and vectors as containers, inspect CPU and peripheral registers and memory in configurable windows, and use the graphical stack view to catch overflow. The call stack is available without a runtime penalty.
Trace, Profiling, and Coverage
Use Embedded Trace Macrocell (ETM) instruction trace on devices that have it, Serial Wire Output (SWO) trace on most Cortex-M3 and higher devices, and the Micro Trace Buffer (MTB) on many Cortex-M0+ devices. Count events and CPU cycles through the Performance Monitoring Unit (PMU). Code coverage is available where the core or device supports it.
AI-Assisted Debugging
An open-source Model Context Protocol (MCP) connector gives AI assistants access to C-SPY debugger and trace data, so they can analyze what happened on the target, not only what the source says. The target keeps running where possible, and the developer approves the fix.
TRY OUT IAR'S PLATFORM
Interactive Demo
Experience IAR's platform and see trace, RTOS awareness, and timeline analysis working together.
Supported Architectures
| Arm | RISC-V | Renesas RL78 | Renesas RH850 | Renesas RX | AVR | AVR32 | MSP430 | 8051 | STM8 | Renesas V850 | CR16C | |
| C-SPY Debugger |
Supported Devices in C-SPY
| Architecture | Manufacturer | Family | Device |
|---|---|---|---|
| Loading... | |||
No results found
Supported Debug Probes
C-SPY connects to your target through a driver, so you can debug with the probe you already have or with IAR’s own.
IAR Debug Probes
I-jet debugs Arm and RISC-V devices. On Arm Cortex-M it also provides SWO trace, and I-jet Trace adds ETM instruction trace, so you can step backward from a fault. Explore IAR Debug Probes.
Additional Supported Debug Probes and Drivers
- Simulator (All)
- CMSIS-DAP probes (Arm)
- J-Link and J-Trace (Arm), J-Link (others)
- ST-LINK JTAG/SWD (Arm, ST Cortex-M devices only)
- TI XDS100v2, XDS100v3, XDS110, and XDS200 (Arm)
- Renesas E2 and E2 Lite (Arm Cortex-M devices and others)
- Renesas E1 and E20 emulators (others)
- GDB Server (Arm and others)
FAQ
Why Do Embedded Timing Bugs Disappear When You Set a Breakpoint?
Can the IAR C-SPY Debugger Attach to a Running Application Without a Reset?
Do I Need a Trace Probe for SWO and ETM Trace Debugging?
Does the IAR C-SPY Debugger Run Natively on Linux?
Which RTOSes Does the IAR C-SPY Debugger Support With RTOS Awareness?
Can I Run the IAR C-SPY Debugger in a CI Pipeline?
Can AI Assistants Connect to the IAR C-SPY Debugger Through MCP?
IAR Software Insights
How to Use AI Agents for Embedded Development with IAR Tools
Give Your AI Agent the Same Tools You Trust on Your Embedded Project A...
Highlights from Microelectronics UK in Embedded Software Development
"Do You Really Expect Developers to Write Code?" It was not the questi...
From Edge AI to 10-Year Product Lifecycles: Key Takeaways from embedded world North America 2026
AI dominated embedded world North America 2026. Every major silicon ve...
Get Access to All
Scale development operations with freedom and flexibility, accelerate innovation with code confidence and simplify compliance.
- Architecture and device agnostic
- Cloud-ready, tailored for enterprises
- Functional safety always included
- Native on Linux and Windows
With our platform, you get access to everything.