<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Matthew Igho on Medium]]></title>
        <description><![CDATA[Stories by Matthew Igho on Medium]]></description>
        <link>https://medium.com/@ighotouch?source=rss-7df1e8bb5270------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*n4SXBqjmJg3Brw4tDHrDSA.jpeg</url>
            <title>Stories by Matthew Igho on Medium</title>
            <link>https://medium.com/@ighotouch?source=rss-7df1e8bb5270------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:33:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ighotouch/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[PHP Debugging with PHPStorm and VSCode]]></title>
            <link>https://ighotouch.medium.com/php-debugging-with-phpstorm-and-vscode-49348e0331d6?source=rss-7df1e8bb5270------2</link>
            <guid isPermaLink="false">https://medium.com/p/49348e0331d6</guid>
            <category><![CDATA[xdebug]]></category>
            <category><![CDATA[phpstorm]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Matthew Igho]]></dc:creator>
            <pubDate>Mon, 17 May 2021 11:53:39 GMT</pubDate>
            <atom:updated>2021-05-17T11:53:39.007Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*MvmWhcWk6dZx-v1UsSSgMQ.png" /><figcaption>PHP Debugging made easy</figcaption></figure><p>Anyone developing software will sooner or later want to debug their code. It’s clarifying to see your code execute step by step and inspect the values of variables at runtime. Developing with PHP is no different.</p><p>In this article, we’ll have a look at PHP debugging, and I’ll also provide some tips and tricks on how to make it work on VSCode and PHPStorm using XDebug.</p><h3>Prerequisites</h3><p>This tutorial assumes that you are familiar with the concept of debugging and have installed Xdebug.</p><p>If you don’t have Xdebug installed on your server, you can do it by using tailored installation instructions from the official Xdebug site <a href="https://xdebug.org/wizard.php">here</a>.</p><h3>Getting started</h3><p>The first thing you need to do is to update your php.ini file with the following config.</p><pre>xdebug.mode=debug</pre><pre>xdebug.log=&quot;/tmp/xdebug.log&quot;</pre><pre>xdebug.client_port=9000</pre><pre>xdebug.start_with_request=trigger</pre><p>For Xdebug v2.x.x:</p><pre>xdebug.remote_enable = 1<br>xdebug.remote_autostart = 1</pre><p>Don’t forget to restart your webserver to reload the settings.</p><pre>sudo apachectl restart</pre><p>Verify that php.ini has been updated by checking your phpinfo() output for an Xdebug section or running `php -i `on your terminal</p><h3><strong>PHPStorm Configuration</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iljUuyplE4xQEZR0zXRzZg.png" /></figure><pre>nc -vz localhost 9000</pre><p>Please ensure you get this response otherwise please ensure the port is properly set on Phpstorm and restarted</p><pre>Connection to localhost port 9003 [tcp/*] succeeded!</pre><h3>VS Code Configuration</h3><p>In your project, go to the debugger and hit the gear icon, and choose <em>PHP</em>. A new launch configuration will be created for you with two configurations:</p><ul><li><strong>Listen for Xdebug</strong> This setting will simply start listening on the specified port (by default 9000) for Xdebug. If you configured Xdebug as recommended above, every time you make a request with a browser to your webserver or launch a CLI script Xdebug will connect and you can stop on breakpoints, exceptions, etc.</li><li><strong>Launch currently open script</strong> This setting is an example of CLI debugging. It will launch the currently opened script as a CLI, show all stdout/stderr output in the debug console, and end the debug session once the script exits.</li></ul><p>Testing</p><p>To verify if all works well set your breakpoints, if you are using Laravel just run the command below on your terminal</p><pre>php artisan serve</pre><p>If you using PHP Storm ensure this button is active</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*c00MPSFO-G5eSqB4xP4qWQ.png" /><figcaption>Ensure this is listening</figcaption></figure><p>To learn more about these configurations please see the links below</p><p><a href="https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug">PHP Debug - Visual Studio Marketplace</a></p><p><a href="https://xdebug.org/docs/step_debug">https://xdebug.org/docs/step_debug</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49348e0331d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>