MATLAB Answers

View errors of Standalone-App created with Matlab Compiler

46 views (last 30 days)
Hi everyone,
I'm new to Matlab Compiler and the export of standalone apps.
I have a Matlab Script which get's some information of a PLC and plots this information to a figure (dynamic process). I implemented a little GUI to select some specific details of the PLC which changes the view on the figure . Everything works fine if I start the GUI from App Designer. But after the compilation with Matlab Compiler the figure doesn't open, just the GUI appears. There is a sound which seems to indicate an error but no error message is displayed.
I followed this answer and tried to get an error message:
But there's no message displayed. Is there any chance to create something like a log-file while running the compiled app or another way to display errors?
I'm using Matlab R2020a and all answers I found on this topic are frome some years ago.
  1 Comment
Dominik Müller
Dominik Müller on 16 Sep 2020
I was able to solve the problem by creating message boxes
msgbox()
which showed me the current step on the program. There was an
addpath
which could obviously not be compiled. After removing this command, the program runs perfectly as standalone app.
It would still be nice to know how to display errors in a log-file, would be much easier than creating lots of messageboxes...

Sign in to comment.

Accepted Answer

Dominik Müller
Dominik Müller on 25 Nov 2020
While exporting your app with Compiler scroll down to the topic 'Additional runtime settings' and put a check on 'Create log file'.

More Answers (1)

Puru Kathuria
Puru Kathuria on 25 Nov 2020
Hi,
You can try using "diary" command to write errors to a log file.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!