Debugging an externally built executable file

Technical Note 190508






5/23/2019 4:22 PM


Debugging using an externally built executable file is useful in various situations.


There are reasons for building an output file in one environment and debugging in a different environment.

This technical note gives some examples of where this approach is useful, and instructions on how to configure the debug-only project.

Some terms

  • An executable file is the output file, linked using the default file format.

  • The file extensions for ILINK and XLINK are .out and .d## respectively, where ## stands for two digits, which are different for different toolchains.
  • The term externally built stands for: Built in another environment/version from the IAR Embedded Workbench version being used for debugging.

Useful examples

  • Build on the command line and debug in the IDE (using the same version).
  • Build with an older version of the IAR Embedded Workbench and debug in a newer version. (This is very useful when a project is to be built using a specific version, still making it possible to take advantage of improvements in the newer debugger version.)
  • Build in Eclipse, and debug in the IAR Embedded Workbench. (Useful when the plug-in has no debug support.)

How to configure the debug-only project

Follow these steps:

  1. Open the IAR Embedded Workbench version that is to be used for debugging.
  2. Choose Project>Create New Project>Externally built executable.
  3. In the Save As dialog box, specify a project name and click Save to save the project.
  4. Read the instructions (in readme.txt) on how to configure the project.

The only project options that are meaningful to set for this kind of project are options in the General Options and Debugger categories.


Building in one environment and debugging in another environment is useful for several scenarios.

Read more in the C-SPY Debugging Guide chapter: Loading executable files built outside the IDE.

All product names are trademarks or registered trademarks of their respective owners.

We do no longer support Internet Explorer. To get the best experience of, we recommend upgrading to a modern browser such as Chrome or Edge.