Skip to content

Instantly share code, notes, and snippets.

@AlexanderAllen
Last active April 28, 2016 00:38
Show Gist options
  • Save AlexanderAllen/045e94f7053e99dca62e44a8584a118c to your computer and use it in GitHub Desktop.
Save AlexanderAllen/045e94f7053e99dca62e44a8584a118c to your computer and use it in GitHub Desktop.
Enabling XDebug on Acquia Dev Desktop - WINDOWS 8.1 - php.ini for PHP 5.5.x
;zend_extension="C:\Program Files (x86)\DevDesktop\php5_5\ext\php_xdebug.dll"
; On windows the name of this thing is different from what suggested on the original .ini.
zend_extension="C:\Program Files (x86)\DevDesktop\php5_5\ext\php_xdebug-2.3.2-5.5-vc11.dll"
xdebug.cli_color=1
xdebug.idekey="DD"
xdebug.remote_host="localhost"
xdebug.remote_enable=1
; The default port works just fine on Acquia Dev Desktop - Windows 8.1.
;xdebug.remote_port=9999
;xdebug.remote_autostart=1
;xdebug.remote_connect_back=0
;; Other useful stuff ;;
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
; max_execution_time = 300
; Change the maximum execution time to infinite so you can leave your debugger running overnight if you want.
; Otherwise, you get "500 Internal Server Error" if you don't finish your debugging session too fast.
max_execution_time = 0
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
; The default is 60.
; max_input_time = 60
; Change it to something appropriate (INFINITE!)
max_input_time = -1
@AlexanderAllen
Copy link
Author

AlexanderAllen commented Apr 27, 2016

Link to documentation for all of XDebug settings
https://xdebug.org/docs/all_settings

Link to PHPStorm Bookmarlets creation page
https://www.jetbrains.com/phpstorm/marklets/

image

@AlexanderAllen
Copy link
Author

Check that it is working on Windows by visiting the Drupal status page:

image

@AlexanderAllen
Copy link
Author

This is the first connection you ever make to XDebug / PHP Storm.

You should see an "Incoming Connection from XDdebug" popup from PHPStorm prompting you to set up "Path Mappings" if you haven't set them up yet.

This is your ultimate sign that everything has been configured properly up to this point.

image

@AlexanderAllen
Copy link
Author

AlexanderAllen commented Apr 27, 2016

Server configuration in PHP Storm. This is my company's "loaner" machine for example, and set up to my boss's user name.

But the server URL and physical location are setup to point to a fork of my client's project sitting locally on my Windows machine.

Bad path mapping
image

Good path mapping
image

@AlexanderAllen
Copy link
Author

AlexanderAllen commented Apr 27, 2016

Screenshots of proper PHP Storm configuration:

The debug port for XDebug must always match what you have set on your php.ini configuration. The default for both XDebug and PHPStorm is port "9000", which works just fine most of the times. However, sometimes you might need to change this to something else if you see PHPStorm complaining about another service on your machine using port 9000.

image

The IDE key must match what you specified in the PHP Storm bookmarklets!

While the IDE Key can be anything, in this case the "DD" in my configuration stands for "(Acquia) Dev Desktop":
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment