How to expose a function call trail &/or debugging mode when compiled as .net

A 3rd party is using a compiled set of .m files and is unsure when the code fails to execute (crashes) or gets hung up. Is there a way to report at the command window the status of the compiled execution and a function call trail when the execution crashes?

 Respuesta aceptada

Jan
Jan el 16 de Abr. de 2018

What is the exact difference between "crash" and "hung up"? An infinite loop is both.

If the M functions have a proper error handling, e.g. timeouts in potentially infinite loops and proper TRY/CATCH blocks to handle problems, there is no need to inject this artificially in the compiled code. The M functions could display the progress also. But if neither a progress indicator nor an error handling is implemented in the M functions, you cannot insert this after the compilation magically.

In theory there is no bullet proof way to distinguish if a program "hung up" or is just slow. A "crash" might mean, that the program does not use any resources anymore, which might be detectable. But this could be a phase of waiting for an external signal also, e.g. the availability of an internet resource.

This concerns human brains also: You cannot prove reliably if a person is conscious. All you can do is to check some typical reactions, but the person might be in a non-typical status.

1 comentario

Is there a way to trace the compiled execution without placing a sprintf statement in each .m file?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Abr. de 2018

Comentada:

el 16 de Abr. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by