Created
May 10, 2017 19:48
-
-
Save jessamynsmith/3a05fd791d4661820ee2e30e2a389826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Read the stack trace carefully. In particular, look for: | |
a) The name and text of the exception | |
b) Where the trace enters your code | |
2. Go to the lowest level in your code that the stack trace showed | |
3. Look carefully at the line of code throwing the error, and the preceeding lines, and see if you can see how they relate to the exception you got. | |
4. Try to imagine what values the variables might have had at this point, to generate the exception you saw. | |
5. If you have a debugger, set a breakpoint on this line and inspect all relevant variables. If you don’t have access to a debugger, print out the values of the variables. | |
6. If you can see a value that looks bad, follow that variable up through the program to see where it came from and why it’s incorrect. | |
7. If you can’t see any values that look bad, rethink you assumptions about what caused the error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment