When we’ve decided to change the development environment from CodeIgniter and Symfony to WordPress, first of all, we reviewed the code, current WordPress development environment and started searching the best WordPress development practices. The main findings of our analysis are in this article. WordPress Debugging Debagging is a very important part of WordPress development environment. Currently, the main problems with debugging in WordPress are the following: Debugging variables through var_dump() When you just need to output the content of the variable, you can use var_dump() within the <pre> tag: However, this is not very convenient as a part of the data is not visible behind the layout, and it is unrealistic to debug a large array of data, e.g.: Logging through WP_DEBUG_LOG You also can enable logging by defining the WP_DEBUG_LOG constant in the wp-config.php file and put the data into the log via error_log(). Although it’s handy to use for the ajax queries logging, the large amounts of data are hard to read and the log file size increases very fast. Using xdebug You can also use xdebug, but it’s not always convenient as it’s quite bulky for checking
Share This