spitfire
(spitfire)
September 8, 2016, 7:56pm
1
I’m trying to get Xdebug to connect back to PhpStorm. Xdebug connects with PhpStorm properly with built-in Php web server but not with Caddy.
Here’s my Caddyfile:
root www
errors visible
gzip
browse
tls off
fastcgi / 127.0.0.1:9001 php
Starting php-cgi.exe
with
php-cgi.exe -b 127.0.0.1:9001
Xdebug configuration in php.ini
:
zend_extension=php_xdebug.dll
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.cli_color=1
Any ideas?
System:
Windows 10 64-bit
Php 7.0.10 with Xdebug 2.4.1
Caddy 0.9.1
Thanks!
abiosoft
(Abiola Ibrahim)
September 8, 2016, 8:52pm
2
Firstly, ensure that is the correct php.ini, you can verify that from the phpinfo page.
What is the port configuration on PhpStorm ?
spitfire
(spitfire)
September 9, 2016, 2:38am
3
The php.ini
path is correct as displayed by phpinfo()
. The port in PhpStorm is 9000.
matt
(Matt Holt)
September 9, 2016, 3:01am
4
The first line of your Caddyfile must be the address of the site you’re serving. Did you intend to serve it on addresses root
and www
?
1 Like
spitfire
(spitfire)
September 9, 2016, 1:57pm
5
Apologize. Yes, I missed copying the outer lines. My full Caddyfile is:
localhost:8080 {
root www
errors visible
gzip
browse
tls off
fastcgi / 127.0.0.1:9001 php
}
Here’s my test PHP index.php
file:
<?php
$var = 'Hello World';
echo $var;
var_dump($_COOKIE);
The breakpoint is set on the second line $var = 'Hello World';
. The dump shows that XDEBUG_SESSION
has been properly set by PhpStorm bookmarklet in Chrome:
Hello World
Z:\Server\CaddyTest\www\index.php:4:
array (size=1)
'XDEBUG_SESSION' => string 'PHPSTORM' (length=8)
spitfire
(spitfire)
October 18, 2016, 2:46pm
6
Still not able to get Xdebug to connect back to PhpStorm with Caddy 0.9.3. Anybody have any luck?
xtfer
(Christopher Skene)
December 8, 2016, 2:46am
7
I’m having the same problem, fwiw.
system
(system)
Closed
March 8, 2017, 2:46am
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.