We’ve already spent quite a bit of time learning how to write code for our programs. But, what if something goes wrong? How can we fix it?
Unfortunately, it is nearly impossible to write a computer program that doesn’t contain any bugs. In fact, it is a common joke among programmers that the only truly bug-free program you’ll ever write is the classic “Hello World” program! So, we’ll need to have some tools at our disposal that we can use to find and fix the various bugs or errors in our code.
In this chapter, we’ll briefly discuss some of the concepts and techniques that we can use to explore and debug our code. In this chapter, we’ll introduce the following concepts:
- Print Statement Debugging
- Call Stack
- Interactive Debuggers
- The Codio Debugger
- Logging