I have gone through nerve cracking troubleshooting situations and finally ended up identifying the problem to be a silly typo mistake. It is something that every developer goes through at least once in his/her lifetime. In some programming languages and scripting languages the variables need not be declared and can be directly used. In such languages there is a high chance that somewhere a simple spelling mistake in the variable could cause everything to go wrong because the misspelled variable becomes another variable. In effect the statement containing the misspelled variable name can cause unexpected outcome that may become very difficult to troubleshoot. And if the program does not throw up any error and executes successfully but the outcome is not what is expected then it can become challenging. The best way to handle such a situation is to log the values of variables at key points of the code and isolate the statement that contains the misspelled variable.
Read my other Troubleshooting Tips.