Is there any way to block on a function call via the MATLAB Engine API for C++?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Debugging and Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!