フィルターのクリア

How do I debug a MEX-file in Microsoft Visual C++ .NET 2003?

1 回表示 (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
編集済み: MathWorks Support Team 2019 年 4 月 18 日
I would like to debug a MEX-file in Microsoft Visual C++ .NET.

採用された回答

MathWorks Support Team
MathWorks Support Team 2019 年 4 月 18 日
編集済み: MathWorks Support Team 2019 年 4 月 18 日
This Solution is specific to the Microsoft Visual Studio .NET 2003 debugger on Windows.
NOTE: This solution is not officially supported by MathWorks.
The following steps demonstrate how to debug a MEX-file in the Microsoft Visual C++ .NET environment:
1. Open the Visual Studio .NET development environment.
2. Open a New "empty" project.
3. Select File->Add Existing Item... And select the name of the MEX-file DLL.
4. Select File->Add Existing Item... And select the name of the MEX-file source.
5. Open the MEX-file source by double-clicking on it in the Solution Explorer frame.
6. Place a break point at the appropriate line of code.
7. Select Project->$PROJECT_NAME settings where $PROJECT_NAME is the name of your project.
8. Under the Configuration Properties, click on "Debugging."
9. Click on "Command" under Action and browse to the MATLAB executable file $MATLABROOT/bin/win32/matlab.exe where $MATLABROOT is the directory in which MATLAB is installed.
10. Click OK.
11. Select Debug->Start or press F5.
12. Click NO if it prompts you to rebuild the out of date project.
13. Click "OK" if it reports that matlab.exe does not contain debugging symbols.
This should open the MATLAB environment after a few moments.
14. Change to the directory location of the MEX-file using the CD command in MATLAB
15. Execute the MEX-file normally. This will start the MSVS 7.0 environment and stop at the break point.
You should now be able to step through the MEX-file as you would any C/C++ applicaton.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeploy to .NET Applications Using MWArray API についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by