Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (0)

Categorie

Scopri di più su Debugging and Analysis in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by