How to debug C# .NET assembly called from MATLAB?
2 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2021 年 1 月 7 日
編集済み: MathWorks Support Team
2025 年 5 月 15 日
I'm trying to use some .NET assemblies from MATLAB but I am encountering a MATLAB System Error.
I was wondering if there is some additional debug logs I can turn on to see the details of the system error to determine what in my .NET assembly might be causing the crash.
採用された回答
MathWorks Support Team
2025 年 5 月 15 日
編集済み: MathWorks Support Team
2025 年 5 月 15 日
Follow the steps below to debug a .NET assembly called from MATLAB:
1) Compile the C# code in 'Debug' mode in Microsoft Visual Studio.
2) Select 'Attach to Process' from the 'Debug' tab in Visual Studio and select the MATLAB process from the 'Available Processes' window. If there is more than one MATLAB process, you can identify the process ID of interest by running one of these MATLAB commands.
(R2025a and later)
matlabProcessID
(R2024b and earlier)
feature getpid
3) Place a break point at the line where you wish the debugger to stop and call it from MATLAB.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で .NET Methods in MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!