MATLAB Compiler    

Controlling Information in Run-Time Errors

Use the debugline:setting option to include source filenames and line numbers in run-time error messages. The possible values for setting are

Not specifying any debugline setting uses the default of off, which does not include filenames and line numbers in the generated run-time error messages.

For example, given the M-file, tmmult.m, which in MATLAB would produce the error message Inner matrix dimensions must agree:

If you create a Compiler-generated MEX-file with the command

and run it, your results are

The information about where the error occurred is not available. However, if you compile tmmult.m and use the -A debugline:on option as in

your results are


  Controlling #line Directives in Output Code Interfacing M-Code to C/C++ Code