function copySfTargetsDebugSettings(srcModelH, harnessH)
    
    [~, mexf] = inmem;
    sfIsHere = any(strcmp(mexf, 'sf'));
    if(sfIsHere),
        rt = sfroot;
        sourceMachine = rt.find('-isa', 'Stateflow.Machine', 'Name', get_param(srcModelH, 'Name'));
        harnessMachine = rt.find('-isa', 'Stateflow.Machine', 'Name', get_param(harnessH, 'Name'));
        
        if ~isempty(harnessMachine) && ~isempty(sourceMachine),
            sourceMachineId = sourceMachine.Id;
            harnessMachineId = harnessMachine.Id;
            
            sf('Private', 'copy_target_props_in_configset', 'sfun', sourceMachineId, harnessMachineId);
            
            harnessMachine.Debug.Animation.Enabled  = sourceMachine.Debug.Animation.Enabled;
            harnessMachine.Debug.Animation.Delay = sourceMachine.Debug.Animation.Delay;
            harnessMachine.Debug.BreakOn.ChartEntry = sourceMachine.Debug.BreakOn.ChartEntry;
            harnessMachine.Debug.BreakOn.EventBroadcast = sourceMachine.Debug.BreakOn.EventBroadcast;
            harnessMachine.Debug.BreakOn.StateEntry = sourceMachine.Debug.BreakOn.StateEntry;
            harnessMachine.Debug.DisableAllBreakpoints = sourceMachine.Debug.DisableAllBreakpoints;
            harnessMachine.Debug.RunTimeCheck.CycleDetection = sourceMachine.Debug.RunTimeCheck.CycleDetection;
            harnessMachine.Debug.RunTimeCheck.DataRangeChecks = sourceMachine.Debug.RunTimeCheck.DataRangeChecks;
            harnessMachine.Debug.RunTimeCheck.StateInconsistencies = sourceMachine.Debug.RunTimeCheck.StateInconsistencies;
        end
    end
end


