フィルターのクリア

Debugging Visual C++ DLL used with Matlab

6 ビュー (過去 30 日間)
Greg Fichter
Greg Fichter 2011 年 6 月 21 日
In the past (version 2006) I've been able to debug a Visual C DLL, which I'm calling from Matlab, by starting Matlab.exe from the Visual C environment. Matlab.exe then loads the DLL, and I can set breakpoints in the DLL functions to debug my code. With the new 2010 and 2011 versions, Matlab.exe stops running before Matlab appears, so the Visual C debugger thinks it has finished. Is there another method of connecting to Matlab so that a DLL can be debugged? Thanks for any ideas.

採用された回答

Chirag Gupta
Chirag Gupta 2011 年 6 月 21 日
I am assuming you are using loadlibrary!
If that's the case, then you can load your VS project (that created the C/C++ DLL) and load the DLL in MATLAB using the loadlibrary function.
At this stage you should Attach to MATLAb process using Tools->Attach To Process in VS.
You should now be able to set breakpoints in the C++ code and calllib calls from MATLAB should trigger the same!
  2 件のコメント
Greg Fichter
Greg Fichter 2011 年 6 月 21 日
Thanks! Just what I needed.
Rami
Rami 2012 年 7 月 31 日
helped me too, thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by