Zeus Productions Banner

Home (Spotlight) | TOC | Products & Ordering | Technical Info | Contact Zeus


Zeus Tech Note
Trouble-Shooting and Debugging

(This document last revised August 1, 1997)

Copyright © 1996-1997. Zeus Productions. All Rights Reserved.
Written by Bruce A. Epstein
trouble-shoot
v. to isolate and diagnose the source of an error.


debug
v. to systematically challenge your assumptions until a problem is resolved.
Debugging is a skill that comes naturally to some people, but can be learned be all. Whether you are a programmer, a psychologist, a doctor , a plumber, or a car mechanic, your job involves debugging. You must diagnose a problem and fix it.

Humans are natural problem-solvers, and you surely employ debugging techniques unconsciously many times each day. Once you understand the process of debugging you will be able to apply it consciously to all aspects of your professional and personal life.

We'll use examples from a variety of different disciplines because the same techniques apply across the board. We'll also look at it from a computer perspective.

A. Define the Problem

The first step towards fixing a problem is to determine its exact nature. To say "it is broken" is not very helpful.

Key Technique: State the nature of the problem clearly, and the circumstances under which it occurs. Be specific.

Example: My child throws temper tantrums.

Assuming your child does not throw temper tantrums 24-hours per day, define the issue more precisely. Such as, "My child throws temper tantrums when we go shopping."

Key Pitfall: Mistaking a symptom for the problem.

Your child is probably throwing a temper tantrum because they are sick, tired, hungry, or jealous. The tantrum is just a symptom of a problem that may be easily addressed by a simple schedule change. Likewise the tics and random noises common to Tourette's Syndrome patients are symptoms. Telling a Tourette's patient to be quiet or stop twitching is unlikely to help.

Computer Technique: Identify the specific steps or circumstances under which the problem occurs. Does your program crash when you print a document, or only if you print a document containing graphics? Write out the specific steps in a bug report that allow someone to reproduce the error.

A. Define the Desired Outcome

You can't work towards or implement a solution efficiently until you have defined your goal. You have to keep your "Eyes on the Prize".

Key Technique: State the specific outcome you hope to achieve.

Example: I want my teenage daughter home by ten o'clock.

You may actually want to prevent your daughter from getting pregnant, but have focused on the time she gets home instead. Is it acceptable for her to bring her boyfriend home at ten o'clock to neck on the couch? If you focus on the wrong issue, you won't really solve the problem.

Key Pitfall: Unintended consequences.

Most actions have consequences which are either unexpected or unintentional. What if your teenage daughter runs away from home rather than obey your strict curfew?

Computer Technique: It is not always clear what constitutes success. Many programmers focus on fixing specific bugs that have been reported to cause crashes. You must also consider whether the application performs adequately. If a solution will compromise performance unacceptably, you must include such criteria in your definition of success.

What if you've only tested your product with one printer? Does it need to work with other printers. Success may be defined not as, "Get it to print," but "Get it print in under 10 seconds at 600 dpi on a all major laser printers."

A. Measure Success

You must not only define success, you must measure whether you have actually acheived it.

Key Technique: Develop a method that verifies what you want to test.

Example: I want my teenage daughter home by ten o'clock.

You may actually want to prevent your daughter from getting pregnant, but have focused on the time she gets home instead. Is it acceptable for her to bring her boyfriend home at ten o'clock to neck on the couch? If you focus on the wrong issue, you won't really solve the problem.

Key Pitfall: Unintended consequences.

Most actions have consequences which are either unexpected or unintentional. What if your teenage daughter runs away from home rather than obey your strict curfew?

Computer Technique: It is not always clear what constitutes success. Many programmers focus on fixing specific bugs that have been reported to cause crashes. You must also consider whether the application performs adequately. If a solution will compromise performance unacceptably, you must include such criteria in your definition of success.

What if you've only tested your product with one printer? Does it need to work with other printers. Success may be defined not as, "Get it to print," but "Get it print in under 10 seconds at 600 dpi on a all major laser printers."

A. Be Realistic


or setting an impossible goal.

Assuming your child does not throw temper tantrums 24-hours per day, define the issue more precisely. Such as, "My child throws temper tantrums when we go shopping."

Declare victory and get out.


A. Do Your Homework

Do Some Measurements
A. Identify Likely Causes

Key Technique: Identify



You Can't Fix a Problem You Can't Find

Key Technique: Be systematic. Check one thing at a time.

Conduct a systematic examination of each component in the system.

Try to narrow down the problem by determining what does work, which will leave you with a better understanding of where the problem lies.

You cannot

Don't overloork the non-obvious - search deeper.


Key Technique: Be systematic. Check one thing at a time.

A. The Most Common Sources of Error are the Easiest to Fix

Key Technique: Don't overlook the obvious.

The most common programming error is a syntax problem or typographical error, such as an incorrect file name or file path. Verify and physically retype the command or file path to make sure that they are correct.

If your computer, printer, hard drive, or monitor doesn't work, make sure it is plugged in, that the power is on, and any cables are connected properly.

A. Narrow the Problem Down

Key Technique: Isolate different components to eliminate them as potential sources of the error.

Locating the error gets you half way to solving it. If not, you have gained useful information and narrowed down the possible sources of error.

Windows Specifics:

Macintosh Specifics:



A. How can I narrow down the problem?

The best approach depends on the nature of the symptoms. If there is smoke coming out of your computer, re-installing the software probably won't help. It is common to have no idea where the problem lies, so you have to start somewhere based on what you know. Conceptually, the trouble-shooting process is always the same, whether you are fixing your car, your body, your computer or your love life.

A. How do I know where to start?

Start with the most likely causes that are easiest to check, and eliminate possibilities as you progress.
Possible sources of error fall loosely into the following categories:
One generally assumes that components that have previously worked are still working. For example, if your printer has worked reliably for years and suddenly stops printing, you might assume that the cable has come loose. On the other hand, if the printer never worked, you might think it was damaged in shipping, or that the wrong cable is being used.

If something works partially or intermittently, this often represents the greatest challenge. Suppose a printer provides poor output. It could be something obvious such as the laser printer is low on toner, or something more subtle, such as the wrong type of paper being used.
The most difficult categories to solve are:

A. How do I actually check the suspected culprit?

As with any undertaking, it helps if you have the right tools and a modicum of patience and experience. Sometimes there is no way to verify or fix a problem without the right tools. One tried and true approach is to substitute a known working part for the suspected culprit. For example, if your printer does not work with your cable, but another cable works, then you know that your cable is at fault.

This can be extraploated to other areas. It is generally easy to swap printers, monitors, cables and even computers. It is somewhat more difficult to swap

A. Once I have determined the problem, how can I solve it?

After you have determined what is going wrong, you can make a guess at its cause. An error may be easy to fix, such as a simple syntax error. Consult the documentation for the proper syntax, make the correction and try the application again.

Other possible solutions fall loosely into the following categories:

A. Why can't I get it to work on all machines?

This is one of the great questions of all time. If you can get your project to work on 90% of installed base of PCs you are doing well. If on the other hand, your project is failing on every PC, the problem is most likely with your Lingo code, an Xtra or your Projector.

For example, most GPFs are caused by conflicts with audio and video card drivers or a misconfigured system. Encourage users to upgrade their drivers, and/or use the Generic VGA 640x480x256 video driver that is available from Microsoft (it ships with Windows for Workgroups, and can be downloaded from Microsoft too).

You should obtain the details of the user's configuration (i.e. make, processor, video and sound cards/drivers, available RAM, etc.) and contact Macromedia regarding known problems with the given hardware/software setup. They maintain a KnowledgeBase which probably has known configuration specific conflicts listed. They also provide a list of known good and bad video cards in a text file that comes with Director called VIDSOUND.WRI.

Consult the Director for Windows README files regarding creating a custom DIRECTOR.INI file that may help in certain situations.



Home (Spotlight) | Table of Contents | Links | Contact Info

Place an Order | Products for Sale | Licensing | Downloads

TechNotes | FAQs | E-Mail Zeus | GuestBook | Glossary

[End of Page]

Copyright © 1996-1997. Zeus Productions. All Rights Reserved.