English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-10-24 20:20:13 · 1 answers · asked by Innocence Redefined 5 in Computers & Internet Programming & Design

1 answers

Quite a few.
First, I code segments to look at variables and structures that print on the console as the program is running. You can turn this on or off with a #define.

Second, breakpoints strategically placed allow you to see what the program is doing. Step through with your debugger.

Look at what kind of data your program is working on when it fails.

Check how much free memory you have before and after you run the program. Look for memory leaks. Maybe part of your code isn't being executed.

My first programming professor was fond of the sit and stare method of looking at code, but that's not great for large programs.

The debugger is probably your best tool, and amazingly, some people don't use it. Being able to step thorugh a program, steping into or over functions really helps.

2006-10-24 20:26:31 · answer #1 · answered by Deirdre H 7 · 1 0

fedest.com, questions and answers