Maybe for superficial bugs in small toy programs. But a real bug in any sophisticated program requires a bit more than looking at the code most of the time. User feedback, log/trace data, performance data, system events data, memory dumps, etc.
Of course the bug could be in proprietary software your code is using. How would you fix that by purely looking at your own code?
Of course the bug could be in proprietary software your code is using. How would you fix that by purely looking at your own code?