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
function tmmult a = ones(2,3); b = ones(4,5); y = mmult(a,b) function y = mmult(a,b) y = a*b;
If you create a Compiler-generated MEX-file with the command
mcc -x tmmult
tmmult ??? Inner matrix dimensions must agree. Error in ==> <matlab>\toolbox\compiler\tmmult.dll
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
mcc -x -A debugline:on tmmult
![]() | Controlling #line Directives in Output Code | Interfacing M-Code to C/C++ Code | ![]() |