Integrated Development Environments (IDEs) and Debugging – discover what the fuss is all about!
An IDE is a very powerful tool that helps you to understand your code. Imagine being able to jump to a function’s declaration, find all usages of said function, and even be able to step through the function line by line to truly understand what is happening in your program (and fix those pesky, hard to find bugs!).
For a long time I thought using a simple text editor like Sublime or Textmate was all a web developer needed. You make a code change, save the file, refresh your browser and it either works or it doesn’t!. If you wanted to be fancy you could even output your variables in a ‘var_dump’!
However, using ‘var_dump’ interjected in your code is not always the best solution (and would sometimes be impossible in an XMLRPC or delayed script), and relying on your editor’s ‘Find’ to search through your entire project to find a function’s declaration is disjointed and can be extremely time consuming.
We’ll walk through using and understanding an IDE (the basics) as well as run through how to set up and step through our code, line by line.
Just imagine, being able to stop at any point of execution in your code, walk line-by-line through it and at any point see what variables are alive and what values they hold. It’s analogous to taking the blindfold off and truly seeing (and understanding) your code.