



And, as we know, that process is time consuming. You will need to start calling these functions, passing the variables that you want to output, and refresh the page in the browser to check the output, and if the variables don’t give you the information that you need to fix the problem, you will need to repeat the process with a different set of variables until you get the information that may be helpful to fix the bug. Let’s suppose that you need to debug a php file, where you are almost sure that there is a bug, base on the server error logs, just using functions like error_log, print_r. Why should we bother about using a tool like xDebug when we have functions error_log, print_r, var_dump and other similar ones that we all have used a lot? Because xDebug will make you a much faster coder and bug fixer. With step debugging, programmers are able to set break points in any line of a PHP script, where they want to stop its execution to be able to see the the program state and behavior at that specific point. PhpStorm, Sublime, Netbeans, Visual Studio Code and others well known IDEs support it. One of the features that Xdebug provides is step debugging, where Xdebug interacts with an IDE using the DBGp protocol. Xdebug, per the official website, “is an extension for PHP, and provides a range of features to improve the PHP development experience”. A list of commands to get DDEV, and a WordPress or Drupal project up and running are available at ttps:///2/how-to-setup-a-wordpress-and-drupal-local-site-with-ddev/ And, you don’t need to know much about docker to be able to use it, you just need to have it installed.

Per Internet: “Debugging is like being the detective in a crime movie where you are also the murderer.” – Filipe FortesĭDEV is an open source tool that allows setting up local sites quickly using docker. Per wikipedia: “In computer programming and software development, debugging is the process of finding and resolving bugs (defects or problems that prevent correct operation) within computer programs, software, or systems.”
