

This video is a part of JetBrains PhpStorm Video Tutorials by JetBrains Technical Evangelist Maarten Balliauw.Download PhpStorm 2023.1 For a quick video overview, check out this roundup of the key changes from our Developer Advocate, … PhpStorm 2023.1 is now available! This release is a major update that includes integration with, improved performance, enhancements to the new UI, a DFA debugger for PHP, and much more.You can also set additional breakpoints, change the value by double clicking on a variable and go step by step through the request. You can now view all the defined variables in your scope with the global variables like $_SERVER, $_COOKIE, $_GET and more. In this case it is the index.php in the api directory. Here we have to select the file in which the request starts. If you now reload the website you should get a new dialog in your PhpStorm window. Now open the local website you want to debug and enable the debugging mode in the right corner of the address bar by clicking on debug in the dropdown.

There should appear a red circle at the line which you clicked. You can do this by clicking on the right of the line number.

Now add a breakpoint in your code which you want to debug. This will stop at every request even if you don’t set a breakpoint. It’s also a good idea to activate “Break at first line of PHP scripts”. We can now open our PhpStorm project and enable the debugging mode in “Run”, “Start Listening for PHP Debug Connections”. For this we can use Xdebug helper from the Chrome Web Store. Now we need a browser extension to enable the debug mode. Zend_extension = "C:\xampp\php\ext\php_xdebug.dll" We now need to replace this section with the following code: xdebug.profiler_output_name = "cachegrind.out.%t-%s" xdebug.profiler_output_dir = "C:\xampp\tmp" zend_extension = "C:\xampp\php\ext\php_xdebug.dll" For this we need to open our php.ini file (C:\xampp\php\php.ini)Īt the bottom of the file you should see the following commented section for the configuration of Xdebug. First let’s configure the our Php installation. Now that we’ve installed the Xdebug extension we need to configure it to work with our Php and Phpstorm installation. If you’re using a newer XAMPP version you should already have this file installed under C:\xampp\php\ext\php_xdebug.dll. You have to choose the right version for your installed php version. To start we need to download the latest Xdebug version from. With xdebug you can set breakpoints in your code, see all defined variable and even change them while running the code.
