Inputs for improving code debuggability apart from logs and error codes

前端 未结 3 823
终归单人心
终归单人心 2020-12-21 02:34

Apart from error codes, error strings and logs, are there any other features which can be incorporated in the code to increase getting debug / trace information during code

3条回答
  •  [愿得一人]
    2020-12-21 03:02

    When building for Linux, I like to be able to print a stack backtrace from a signal handler. This helps debug crashes (SIGSEGV) or allows me to send a signal to the program to initiate a stack backtrace at runtime. Core dumps can also be useful in debugging crashes (again in Linux).

提交回复
热议问题