Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 97

Fixing a Program with a Debugger

Оглавление

Eventually, everyone makes a mistake writing a program. That mistake could be as simple as incorrectly typing a command or forgetting a closing parenthesis, or it could be as complicated as an algorithm that works perfectly except when receiving certain data. Because writing error-free programs is nearly impossible, most programmers use a special tool called a debugger.

Program errors are called bugs, so a debugger helps you find and eliminate bugs in your program.

Two common debugger features include

 Stepping or tracing

 Variable watching

Not all bugs are created equal:

 Some bugs are just annoying, such as the wrong color on a drop-down list.

 Some bugs are critical, such as a bug that adds two numbers wrong in an accounting program.

 Any bug that keeps a program from running correctly is a showstopper.

Beginning Programming All-in-One For Dummies

Подняться наверх