Update
This commit is contained in:
parent
40e30eb386
commit
e0e62826e2
4 changed files with 1677 additions and 1674 deletions
|
@ -19,6 +19,8 @@ Debugging programs mostly happens in these steps:
|
|||
|
||||
For debugging your program it may greatly help to make **debugging builds** -- you may pass flags to your compiler that make the program better for debugging, e.g. with [gcc](gcc.md) you will likely want to use `-g` (generate debug symbols) and `-Og` (optimize for debugging) flags. Without this debuggers will still work but may be e.g. unable to tell you the name of function inside which the program crashed etc.
|
||||
|
||||
Also as with everything you get better at debugging with practice, especially when you learn about common types of bugs and how they manifest -- for example you'll learn to just quickly scan for the famous *[off by one](off_by_one.md)* bugs near any loop, you'll learn that when a value grows and then jumps to zero it's an [overflow](overflow.md), that your program getting stuck and crashing after a while could mean infinite [recursion](recursion.md) etc.
|
||||
|
||||
The following are some of the most common methods used to debug software, roughly in order by which one typically applies them in practice.
|
||||
|
||||
### Testing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue