Can I Debug Compiled Code? Is there a reason that a program would run in the MATLAB environment but not as a standalone executable?
Afficher commentaires plus anciens
I have a gui and associated .m files that run properly from the MATLAB interface. When I compile them, however, the main function does not run properly. Based on output files, I know that it starts, but somewhere it dies before it finishes running. There are no error messages and nothing to indicate where it stops running. Again, it only has this problem in the compiled version.
Can anyone suggest a path I should explore? Is there a way to debug a compiled application? I haven't done much with the compiler so I could easily be missing something obvious.
Thanks
Réponse acceptée
Plus de réponses (2)
Thomas Richner
le 15 Mai 2018
Modifié(e) : Thomas Richner
le 15 Mai 2018
0 votes
Here's a link to a better answer: https://www.mathworks.com/matlabcentral/answers/93287-is-there-a-way-to-debug-a-matlab-compiler-4-0-r14-generated-executable
1 commentaire
Image Analyst
le 15 Mai 2018
This "better answer" is just one of the things in the FAQ link I gave. It's #11 in the FAQ list.
Kent Schonert
le 27 Juin 2019
It is often very helpful to save the workspace right before the offending error line executes when debugging. By reviewing the workspace contents of the resultant who.mat file, I can often figure out what the problem was.
if isdeployed
save who
end
% line # of error listed in MCR app command output
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!