You can debug sysbuild domains in the same way as you debug single-image build configurations.
To enable debugging for a domain, edit the sysbuild domain and set its optimization level to Optimize for debugging. For the full set of debugging options, you can keep the Include debug thread information option enabled.
To start debugging multi-core applications, click Debug in the Actions View and select the domains to open a debugging session for. See How to debug applications for a multi-core System on Chip for more information.
Take the following rules into account when you want to debug domains:
- When you debug multiple domains, the entire sysbuild configuration is flashed before the debugger is attached to each domain.
- Each domain can have its own debug optimizations enabled independently. The top build configuration checks if debugging options are enabled for each specific domain.
- The debug optimization set in the top build configuration is valid for the main domain, featured at the top of the domain list. Compared with enabling debugging for a build configuration, the main domain sets the
CONFIG_DEBUG_OPTIMIZATIONSor theCONFIG_DEBUG_THREAD_INFOKconfig options (or both), but other domains set<domain_name>_CONFIG_DEBUG_OPTIMIZATIONSor<domain_name>_CONFIG_DEBUG_THREAD_INFOKconfig options (or both). - Some domains can inherit debug optimizations from other domains if this is set in the CMake configuration of the domain. For example, in the Asset Tracker application, the S1 domain gets its optimization settings from the MCUboot domain.
- When using Debug with Ozone, the extension warns you if no debug optimizations are enabled for the domain you're trying to debug.