filmov
tv
How to use Xdebug with PhpStorm
Показать описание
Debugging for WordPress using Xdebug in PhpStorm is a great way to track down hard-to-find bugs. If you’ve never had to set it up yourself, the prospect of configuring everything can be scary. With PHPStorm’s Zero Configuration guide, you can have Xdebug configured in minutes and enable step debugging, profiling, and even debugging on remote WordPress sites.
In this video, we walk you through the process of enabling Xdebug for your PHP environment, installing the debug extensions for your browser, and turning on debug connections for PhpStorm. We then look at a simple bug in a WordPress plugin and show you how to debug the problem using the tools available.
In this video, we cover:
Setting a breakpoint to pause your code once Xdebug is enabled and active
Inspecting and setting a watch on a variable that causes a bug
Stepping into the code to see how that variable changes and what causes the bug
Editing the variable mid debug to see if our assumed fix resolves the problem
Resources:
If you’re using a different editor, our latest article, How to Use Xdebug for Advanced PHP Debugging, covers various editing environments, but we focus on PhpStorm. We also cover topics like profiling and remote debugging and look at an alternative to Xdebug.
To set up and configure Xdebug in PhpStorm, Jetbrains has an excellent help doc on their website, covering everything you need. It includes the Xdebug configuration settings and the links to the browser extensions.
Finally, take a look at the Xdebug Install docs for any Xdebug specific information. With the new Xdebug 3.0 release, the way you enable Xdebug has changed slightly, so this is a great resource.
In this video, we walk you through the process of enabling Xdebug for your PHP environment, installing the debug extensions for your browser, and turning on debug connections for PhpStorm. We then look at a simple bug in a WordPress plugin and show you how to debug the problem using the tools available.
In this video, we cover:
Setting a breakpoint to pause your code once Xdebug is enabled and active
Inspecting and setting a watch on a variable that causes a bug
Stepping into the code to see how that variable changes and what causes the bug
Editing the variable mid debug to see if our assumed fix resolves the problem
Resources:
If you’re using a different editor, our latest article, How to Use Xdebug for Advanced PHP Debugging, covers various editing environments, but we focus on PhpStorm. We also cover topics like profiling and remote debugging and look at an alternative to Xdebug.
To set up and configure Xdebug in PhpStorm, Jetbrains has an excellent help doc on their website, covering everything you need. It includes the Xdebug configuration settings and the links to the browser extensions.
Finally, take a look at the Xdebug Install docs for any Xdebug specific information. With the new Xdebug 3.0 release, the way you enable Xdebug has changed slightly, so this is a great resource.
Комментарии