|
|
|
|
|
by davidsiems
5622 days ago
|
|
For C/C++ the debugger is an invaluable tool. For large projects (especially large projects that don't have the files structured well) you can end up with very high compile and link times (> 2 minutes). Using a debugger in this case is much faster than incrementally adding print statements to the code. Being able to see a callstack is also incredibly valuable on complex projects. The value of printing things out drops dramatically once you have multiple entry points into the same codepath. Also, if you always run your program through the debugger, when you crash you can immediately diagnose and fix the problem without having to reproduce the crash. This is useful for hard to reproduce bugs. Besides, it's not like this is an 'either or' type thing. You can use a combination of reading the code, debugging, and printing to track down problems. |
|