Effacer les filtres
Effacer les filtres

Is there any way to block on a function call via the MATLAB Engine API for C++?

1 vue (au cours des 30 derniers jours)
Kevin Poole
Kevin Poole le 12 Juil 2016
Modifié(e) : Kevin Poole le 12 Juil 2016
I would like to debug MATLAB code that I am calling via the MATLAB Engine API for C++. I am able to programmatically set a breakpoint in "my_file.m" by placing:
dbstop in my_file.m at 9;
on line #3 in "my_file.m". Then, when I open up the MATLAB instance in my C++ code, I just call "matlab" which pops up the GUI, and that's great. The issue is that later in the C++ code when I use engEvalString to call the MATLAB function that is defined in "my_file" (and this function gets called many times), since the call does not block I can't truly just step through the code in "real time", rather I end up with this strange paradigm where I still have a "debug session" opened up and stopped at line 9, but it has already run through and the C++ program has finished (and errored out quite nicely).
Please advise.

Réponses (0)

Catégories

En savoir plus sur Debugging and Analysis dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by