function reCompileForDebug(pathToBuildInfo)
% reCompileForDebug(pathToBuildInfo) re-compiles a hierarchy of components
% with debug symbols, so that the resulting mex file, library or executable
% can be debugged.
%
% Input argument pathToBuildInfo is the absolute path to the folder which
% contains the buildInfo.mat file of the topmost component.

% Copyright 2019-2020 The MathWorks, Inc.

% Re-build, specifying a debug build (either TMF or Toolchain approach)
codebuild(pathToBuildInfo, 'BuildConfiguration', 'Debug');