Debug: PHP Web Application doesn't register with DBGp proxy

Hello,

I've been busy setting up a debug configuration yesterday, but in the end one problem remained. I want to use a PHP Web Application debug configuration, because that does some things automatically that a PHP Remote Debug configuration requires to do by hand.

The problem is as follows: I use a DBGp proxy, and in order for that to work I have to register my IDE with the DBGp proxy using my IDE key. That way, when a connection comes in, it can redirect that connection to my IDE if the IDE key in the incoming connection matches my registration. However, when a PHP Web Application debug session is started, it launches my website with in the URL a randomly generated key (so it seems), which by then has not been registered with the DBGp proxy, so the proxy can't/doesn't redirect the incoming DBGp connection to my IDE.

This raises several questions for me:

  • First and foremost: am I missing something? I'm not very experienced with remote debugging (a complete noob, so to say) so it could well be me missing something rather than stuff not working as supposed.
  • Why isn't the PHP Web Application debug configuration using the IDE key that I've set in the DBGp proxy settings? (And why can't I set a IDE key here like I can in a PHP Remote Debug configuration?)
  • Why doesn't the PHP Web Application configuration have (an option to enable) support for proxies, by first registering the generated key with the DBGp proxy before launching a web page
  • (not very relevant for my problem but also an issue: why doesn't the PHP Web Application configuration type have support for HTTPS sites? I can set the port to 443 but I can't add https:// to the web address as that will send me to http://https//mywebsite.com/)

I hope you can help me out, and also that the issues above may be resolved in the future. :)

~Reinier

0
3 comments

I have tried to reproduce that (without DBGp though), and PhpStorm sets XDEBUG_SESSION to "PHPSTORM" as it's configured.

Could you please show us the XDebug section of your php.ini?

As for the last request, please vote: https://youtrack.jetbrains.com/issue/WI-14599

0
Avatar
Permanently deleted user

> I have tried to reproduce that (without DBGp though), and PhpStorm sets XDEBUG_SESSION to "PHPSTORM" as it's configured.

Is this with a PHP Web Application or PHP Remote Debug configuration? With a PHP Web Application config, a debug session launches http://mywebsite.com/?XDEBUG_SESSION_START={random 4- or 5-digit numerical code} for me. I can't find any setting to change this.

as for php.ini:

[Xdebug]
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_port = 6547 ;this works because of portforward to DBGp proxy
xdebug.remote_host = mywebsite.com
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
;xdebug.default_enable = 0
xdebug.profiler_output_name = "cachegrind.out.%t"
xdebug.profiler_output_dir = "/tmp"
;xdebug.idekey = SECRETKEY ;doesn't work anyways somehow

I have commented out xdebug.idekey because even when I set it, Xdebug uses the key of ?XDEBUG_SESSION_START={random 4- or 5-digit numerical code} in the URL or XDEBUG_SESSION = KEY in the GET request's parameters. So I can control XDEBUG_SESSION myself by using a debug helper extension, but I don't seem to have any way of controlling the code that PhpStorm puts in the URL when a PHP Web Application debug session is launched. (because when I put ?XDEBUG_SESSION_START=IDEKEY in the URL, where IDEKEY matches the key that I've set in my DBGp proxy settings, it works as it should. I just don't get why PhpStorm doesn't do this by itself..)

 

0

Sorry for the previous post, I did something wrong, it does really use this 5-digit value instead.

As it turned out, we don't support working with DBGp via the Web Application configuration, here's the feature request: https://youtrack.jetbrains.com/issue/WI-29011

1

Please sign in to leave a comment.