Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Starting a debugging session


"Now is the time for all programmers to start debugging their code"

Like most IDEs, PhpStorm also uses a bug icon to show the debugger. Just as a bug leeches your blood and doesn't let you concentrate on your main task, a software bug can leech precious CPU cycles and not allow your software to work as expected.

To prevent such bugs from entering the life cycle of software, you need to do debugging. Debugging is the process of diving deep into the code and finding out the potential areas that might be the problem causing regions in the code, so do extensive lookup to find and rectify the bugs.

The tools available for the purpose are termed debuggers in the industry. Xdebug is the name for one such tool. It is a very commonly used, free, and open source debugger that is available to be plugged in with most IDEs.

Getting ready

To plug it in, you need to install it on your development machine. Perform the following steps:

  1. Check out the source code from GitHub, the repository...