Purposefully debugging without using a debugger?

后端 未结 20 1801
春和景丽
春和景丽 2021-02-01 08:49

In chapter 5 of \"The Practice of Programming\" Brian Kernighan and Rob Pike write:

As a personal choice, we tend not to use debuggers beyond getting a st

相关标签:
20条回答
  • 2021-02-01 09:44

    These guys come from the unix era where full fledged IDE's were not at hand. Thats why adding printf is much faster than starting up GDB.

    Nowadays setting a breakpoint in visual studio is the fastest way to debug, so everyone uses that

    On different platforms like embedded devices, having printfs to a log file or something similar is still the fastest option

    0 讨论(0)
  • 2021-02-01 09:45

    Some bugs may show themselves only in release mode therefore using a debugger may not be possible. In those situations, i often use printf :).

    0 讨论(0)
提交回复
热议问题