필터 지우기
필터 지우기

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

조회 수: 1 (최근 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 CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by