When you are in a position that you don’t know if your code is the faulty one or the bug is somewhere else. Sometimes you can just use another program that you know is working and use it to verify where the bug is at.
An example. Say you have written code to load a BMP file format. You use your program, but the image has some weird artifacts. Is it a bug in your code? Or is it a corrupted BMP file?
You can simply load the same BMP file with another program such as window’s paint, and see if it loads properly or if paint is having problems with this file as well. If paint loads the BMP file properly, the bug might be in your code.
I have given the BMP file format as an example, but this is true to many other fields where you have some tool you know is working right. It is kind of similar to the Bug negative verification.