Is there a way to debug a MATLAB Compiler 4.0 (R14) generated executable?

15 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 29 Apr 2019
Edited: MathWorks Support Team on 29 Apr 2019
With the redesign of the MATLAB Compiler that took place between R13 and R14, it is no longer possible or necessary to debug your code using a debugger. Your code should be verified inside MATLAB before compiling it.
If your stand-alone does not behave as expected and you are unable to see any error messages or warnings, then proceed as follows in order to debug the runtime behavior:
1. Open a command prompt (DOS / shell).
2. Navigate to the folder that contains your executable using the "cd" command.
3. Start your stand-alone from the command prompt, any error messages or warnings should appear as they usually do in the MATLAB Command Window.
4. Windows users only: If you generated your stand-alone as a "Windows Standalone Application" (MCC option -e), then you will need to rebuild your project without this option in order for the DOS Command Window not to get suppressed, otherwise you will not be able to see the error messages or warnings that might be shown.
If you want to debug a compiled MATLAB shared library, you can also use functionality such as message boxes or write log files to get more information for debugging purposes. See below MATLAB Answers Post for more information:

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!