How To Setup PhpStorm To Debug OctoberCMS

- 1 answer

I have tried debugbar, but this does not give me enough information.

I have also tried setting up OctoberCMS using that same method to debug as I would with Laravel, but when I set a break point it stops at index.php. Also, I have tried the validation script inside PhpStorm, but it gives a 404 error.

I am trying to debug a plugin that I am developing, and it would be easier using an IDE like PhpStorm or NetBeans. Any help would be appreciated.

I have setup phpstorm to debug a laravel project by setting the URL:/phpstorm/public in the PHP Web Page settings but when I try some thing simular in my octobercms project all I get is waiting for connection meaning that the break point never gets hit here are the setting I am using

xdebug.remote_port= 9000
xdebug.profiler_output_dir ="c:/wamp64/tmp/"

in the PHP Web page I have

start URL: /octobercms/backend/rainlab/blog/Posts I have not set path mappings in the server as did not do this for the Laravel project I am using WAMP64 with the following settings c:/wamp64/www/octobercms/ and this is my vitrual host file

<VirtualHost *:80>
    ServerName octobercms.test
    DocumentRoot "c:/wamp64/www/octobercms"
    <Directory  "c:/wamp64/www/octobercms">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        DirectoryIndex index.php index.html
        Require local

any advise on the setting I should use for Octobercms would be helpful



I am not sure if this helps but after several attemps to get this to work I managed to get phpstorm to stop at the breakpoint I selected by the following

  1. Set up wamp up as above
  2. In the PHP Web Page section I set the Start URL: to /octobercms/backend/rainlab/blog/posts and apply settings
  3. Set a break point in Posts.php
  4. pressed the run button

and all is well with the world, I can now try to figure out why my plugin is not doing what its supposed to.