MATLAB: How to debug a .m -> .mex file in Visual Studio

.mexw64codegendebugvisual studio

I've seen answers explaining how to debug a mex file generated using the mex command (e.g., mex -g yprime.c). I'd like to debug a .mexw64 file that was generated using codegen.
TIA.

Best Answer

Hi Arthur,
I hope you are using 64-bit version of Windows OS and a 64 bit version of MATLAB to execute. Debugging mexw64 would be same as debugging mex file. Kindly refer to the documentation here or here.