User`s manual
2 Creating C Language MEX-Files
2-48
Note The tick marks used are back ticks (‘), not single quotes (').
You may need to tell the debugger where the MEX-file was loaded or the name
of the MEX-file, in which case MATLAB will display the appropriate command
for you to use. At this point, you are ready to start debugging. You can list the
source code for your MEX-file and set breakpoints in it. It is often convenient
to set one at
mexFunction so that you stop at the beginning of the gateway
routine. To proceed from the breakpoint, issue a
continue command to the
debugger.
<dbx> cont
Once you hit one of your breakpoints, you can make full use of any facilities
that your debugger provides to examine variables, display memory, or inspect
registers. Refer to the documentation provided with your debugger for
information on its use.
Note For information on debugging on other UNIX platforms, access the
MathWorks Technical Support Web site at
http://www.mathworks.com/
support.
Debugging on Windows
The following sections provide instructions on how to debug on Microsoft
Windows systems using various compilers.
Microsoft Compiler
If you are using the Microsoft compiler:
1 Start the Microsoft Visual Studio (Version 5 or 6) by typing at the DOS
prompt
msdev filename.dll
2 In the Microsoft environment, from the Project menu, select Settings. In
the window that opens, select the
Debug tab. This options window contains