Difference between revisions of "Debugging"

From ProgClub
Jump to: navigation, search
Line 4: Line 4:
 
* have you made an assignment (=) instead of an expression (==)?
 
* have you made an assignment (=) instead of an expression (==)?
 
* did you forget to call your parent's constructor?
 
* did you forget to call your parent's constructor?
 +
* did you pass a constant value instead of a constant name to e.g. defined()

Revision as of 00:13, 28 February 2022

Some questions to ask yourself when you're debugging a problem:

  • have you used an 'if' statement where you need a 'while', or vice versa?
  • have you made an assignment (=) instead of an expression (==)?
  • did you forget to call your parent's constructor?
  • did you pass a constant value instead of a constant name to e.g. defined()