How to Debug mex files in Matlab
January 6th, 2010
I always have to look up the procedure for debugging code in compiled mex extensions in Matlab, so here it is:
shell> matlab -Dgdb
gdb> run -nodesktop -nojvm
matlab> dbmex on
matlab> foo() % Execute the mex function being debugged
gdb> break foo.cpp:17 # Set up breakpoints
gdb> continue
Sorry, comments are closed for this article.