Debugging C++ mex files in Xcode 7 on El Capitan
Show older comments
I have just migrated to MAC OS, and am trying to debug a mex file for the first time. I'm using MATLAB R2015b and Xcode 7.0.1 on OS X 10.11 (El Capitan). I've followed the instructions here:
When I hit Command-R I see "Running StartMATLAB : debug" in the status bar at the top of the Xcode window. However, shortly afterwards that changes to "Finished StartMATLAB : debug", and MATLAB never actually appears.
Another thing I've tried is attaching Xcode to the MATLAB process. If I have the JVM running, it continuously hits breakpoints in assemble code, even before I call my code. If I run with the -nojvm option and attach the debugger, it doesn't stop on my breakpoints.
I should add that I'm compiling the mex file from within MATLAB. Perhaps Xcode is not watching the mex library that gets built, unlike if I do the same thing in Visual Studio.
Any help much appreciated.
Answers (2)
Oliver Woodford
on 23 Oct 2015
Edited: Oliver Woodford
on 15 Nov 2016
Oliver Woodford
on 15 Nov 2016
0 votes
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
