Build while debugging

The debug session locks the debugged elf when Create and Use Copy of Executable checkbox is not selected, see Symbolics. If you make changes to the source files and rebuild the project while a debug session is on, the build commands are invoked but the locked files are not overwritten and a link-time error is generated.

This feature allows automatic termination of the debug sessions when initiating a build that produces executables locked by those debug sessions.

To enable build while debugging:

  1. Choose Window > Preferences from the IDE menu bar.

    The Preferences dialog appears.

  2. Choose C/C++ > Debug > CodeWarrior Debugger.

    The CodeWarrior debugger preferences appears in the right pane of the Preferences dialog.

    Figure 1. Preferences dialog

    Preferences dialog

  3. Select the Automatically terminate debug session on project rebuild, don't ask checkbox.
  4. Click Apply.
  5. Click OK.
    Note: Applying this setting immediately effects the project.

Now the debug session will automatically terminate while initiating a build that produces executables locked by those debug sessions