Skip to content

Instantly share code, notes, and snippets.

@RyanRLong
Forked from dhrrgn/VagrantXDebug.md
Created October 13, 2017 20:03
Show Gist options
  • Select an option

  • Save RyanRLong/f85362dbc4bfe73c37776118ed713856 to your computer and use it in GitHub Desktop.

Select an option

Save RyanRLong/f85362dbc4bfe73c37776118ed713856 to your computer and use it in GitHub Desktop.

Revisions

  1. @dhrrgn dhrrgn revised this gist May 5, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions VagrantXDebug.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,10 @@ The `remote_host` is the IDE's host ip from the vagrant box. `10.0.2.2` seems to

    ![](http://f.cl.ly/items/2P0X0x2S1E0Q2H241w2Q/Screen%20Shot%202014-05-05%20at%202.55.43%20PM.png)

    ## Set a breakpoint

    ![](http://f.cl.ly/items/1k0P0M23382a2q3M1U2h/Screen%20Shot%202014-05-05%20at%203.24.39%20PM.png)

    ## Run your command, then switch to PHPStorm

    ![](http://f.cl.ly/items/1b3Y1W2W1O1m3e1f0s3W/bin_console_-_tackk_-____Code_work_tackk_.png)
  2. @dhrrgn dhrrgn revised this gist May 5, 2014. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions VagrantXDebug.md
    Original file line number Diff line number Diff line change
    @@ -33,3 +33,9 @@ The `remote_host` is the IDE's host ip from the vagrant box. `10.0.2.2` seems to
    ### Run > Debug...

    ![](http://f.cl.ly/items/2P0X0x2S1E0Q2H241w2Q/Screen%20Shot%202014-05-05%20at%202.55.43%20PM.png)

    ## Run your command, then switch to PHPStorm

    ![](http://f.cl.ly/items/1b3Y1W2W1O1m3e1f0s3W/bin_console_-_tackk_-____Code_work_tackk_.png)

    # Profit!
  3. @dhrrgn dhrrgn revised this gist May 5, 2014. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion VagrantXDebug.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Configure

    ## `xdebug.ini`

    ``` ini
    @@ -22,5 +24,12 @@ The `remote_host` is the IDE's host ip from the vagrant box. `10.0.2.2` seems to

    #### Run > Edit Configurations...

    ![](http://cl.ly/image/3E2M1P1E1N1X)
    ![](http://f.cl.ly/items/0r31131S0L3X0D0m3S2z/Screen%20Shot%202014-05-05%20at%202.53.06%20PM.png)

    ![](http://f.cl.ly/items/0e352f2c0L1l3R2U4644/Screen%20Shot%202014-05-05%20at%202.54.22%20PM.png)

    # Start Debugging

    ### Run > Debug...

    ![](http://f.cl.ly/items/2P0X0x2S1E0Q2H241w2Q/Screen%20Shot%202014-05-05%20at%202.55.43%20PM.png)
  4. @dhrrgn dhrrgn revised this gist May 5, 2014. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion VagrantXDebug.md
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,11 @@ The `remote_host` is the IDE's host ip from the vagrant box. `10.0.2.2` seems to

    ### Setup Server

    ![](http://f.cl.ly/items/3a1h2u033f1w181q0a1r/Screen%20Shot%202014-05-05%20at%202.50.09%20PM.png)
    ![](http://f.cl.ly/items/3a1h2u033f1w181q0a1r/Screen%20Shot%202014-05-05%20at%202.50.09%20PM.png)

    ### Add Debug Configuration

    #### Run > Edit Configurations...

    ![](http://cl.ly/image/3E2M1P1E1N1X)

  5. @dhrrgn dhrrgn renamed this gist May 5, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @dhrrgn dhrrgn created this gist May 5, 2014.
    19 changes: 19 additions & 0 deletions Vagrant XDebug
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    ## `xdebug.ini`

    ``` ini
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_port=9000
    xdebug.remote_autostart=1
    xdebug.remote_connect_back=1
    xdebug.idekey=vagrant
    xdebug.remote_host=10.0.2.2
    ```

    The `remote_host` is the IDE's host ip from the vagrant box. `10.0.2.2` seems to be the default...i think, works for me.

    ## In PHPStorm

    ### Setup Server

    ![](http://f.cl.ly/items/3a1h2u033f1w181q0a1r/Screen%20Shot%202014-05-05%20at%202.50.09%20PM.png)