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?

 采纳的回答

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 个评论

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

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by