CodyF
CodyF

Reputation: 5227

Debugging DLLs used in Matlab

I'm generating the DLL/PCB files for a library to be used by Matlab (.NET in Matlab). In Matlab I point to the Debug/bin folder of my library project.

NET.addAssembly('some\path\Debug\bin\MyLibrary.dll'));

Is it possible to debug a DLL used in Matlab when the DLL is loaded from Matlab instead of a Visual Studio application?

Upvotes: 1

Views: 469

Answers (1)

Michael Shaffer
Michael Shaffer

Reputation: 374

Using Visual Studio you can go to 'Debug'->'Attach to Process...' and attach the debugger to the process that loaded your DLL (MATLAB.exe).

Notes:

  1. Your PCB files need to be in the directory of the loaded DLLs.
  2. Select in the 'Select Code Type' dialog the managed code types, because automatically just selects native code type for MATLAB.

Upvotes: 3

Related Questions