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

2 ビュー (過去 30 日間)
Kevin Poole
Kevin Poole 2016 年 7 月 12 日
編集済み: Kevin Poole 2016 年 7 月 12 日
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.

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall MATLAB from C についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by