Hello, @viktor1
Sorry for our late answer.
Unfortunately, debugging code from MATLAB or Simulink that runs directly on an embedded NXP target is not possible. For debugging the generated code, you could use the S32 Design Studio for ARM, by taking the generated elf file from Simulink and selecting it in a S32DS debugging project.
Regards,
Stefan.