| 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
tmmult ??? Error using ==> * Inner matrix dimensions must agree. Error in ==> <matlab>\toolbox\compiler\mmult.m On line 2 ==> y = a*b; ??? Error using ==> * 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
??? Error using ==> tmmult Error using ==> * Inner matrix dimensions must agree. Error in File: "<matlab>\extern\examples\compiler\tmmult.m", Function: "tmmult", Line: 4.
| Controlling #line Directives in Output Code | Interfacing M-Code to C/C++ Code | ![]() |