1

I spent hours trying to figure out how, but I can't manage to debug with JetBrains Client... The more I get when I load a page in a browser is

enter image description here

And then it stuck there. Page in browser is loading forever.

Launching dbgpProxy + JetBrains client register IDE

enter image description here

php -v output:

PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
   with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
   with Xdebug v3.0.2, Copyright (c) 2002-2021, by Derick Rethans

Xdebug configuration :

xdebug.idekey=PHPSTORM
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
xdebug.mode=debug
xdebug.log="/var/log/xdebug.log"

dbgpProxy launch command:

dbgpProxy -i 127.0.0.1:9001 -s 127.0.0.1:9003

JetBrains client configuration

PHP > Debug on host > Xdebug : debug port 9099
PHP > Debug > DBGp Proxy on host : IDE key : PHPStorm, Host 127.0.0.1, Port 9001

Browser extension : Xdebug helper v 1.0.6

NOTE : It worked like a charm with PhpStorm, but with JetBrains Client I miss something which leads the IDE closing the connection.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Francois
  • 81
  • 1
  • 7
  • 1
    Why do you need the dbgpProxy? – Derick May 25 '22 at 13:19
  • I may suggest to collect extra logs on JetBrains PHP debug end (PhpStorm I guess): https://www.jetbrains.com/help/phpstorm/troubleshooting-php-debugging.html#collecting-logs to see what is happening there (how does your IDE responds to a incoming proxy connection etc). It may shed some light on what is happening there. – LazyOne May 25 '22 at 14:23
  • P.S. I do not know what IDE you are using exactly, but I have added PhpStorm here (so the PhpStorm folks may notice it). Even if you do not have such an issue when using the IDE directly. – LazyOne May 25 '22 at 14:25
  • @Derick : i used to need it because i was working from differents IP before with PhpStorm. At LazyOne : This is PhpStorm, but with an IDE Backend on my dev server, so you are writing code directly on the server, connecting to it through SSH tunnel So i realise with this PhpStorm/JetBrains Client behavior, i don't need anymore to have a proxy : i can work from work or at home through VPN, no matter of IPs, and debug without dbgpProxy : it works perfectly ! Should i delete this question ? Or leave for someone else answers ? – Francois May 30 '22 at 09:54
  • @Francois If it would be me ... I would make my own answer (why it is not needed here) -- it will be useful to other users in a similar situation. Just expand your comment (why you though you would need it, why it is actually not needed etc), and make an answer (that you can accept later). – LazyOne May 31 '22 at 10:11
  • 1
    @Francois P.S. *"...connecting to it through SSH tunnel..."* Are you the only dev that work with that server (PHP debug)? If you are then SSH tunnel will be enough (if you have local code). dbgpProxy is needed if you have multiple devs connecting from different IPs *at the same time*. With a single dev it's not needed as SSH tunnel will use the same port every time so the same settings will work regardless of your local PC IP. – LazyOne May 31 '22 at 10:15

0 Answers0