Zed
Zed

Reputation: 5921

Starting debug without XDEBUG_SESSION_START at the of query

I created basic PHP Web Application Launch configuration in PHPStrom, that uses Xdebug. However after hitting run, query parameter XDEBUG_SESSION_START is added to the end of URL, and because of the nature of my application this causes some errors inside the app. So, is there a way to stop adding that parameter at the end of URL, or maybe adding that parameter as the first query parameter in URL ?

Upvotes: 5

Views: 24057

Answers (2)

Agus Syahputra
Agus Syahputra

Reputation: 446

I tried. And it's possible.

You can use the browser extensions:


Or by using the settings in the php.ini file. Add the xdebug.remote_enable=true and xdebug.remote_autostart=true into your php.ini and restart your web server.

Something like this:

[xdebug]
zend_extension="C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_autostart=true

Upvotes: 2

nl-x
nl-x

Reputation: 11832

I don't know the exact behavior of your IDE (PHPStrom), but in my experience, after you hit run and launch a browser with the XDEBUG_SESSION_START addition to the url, you can just change the url in the browser and remove the XDEBUG_SESSION_START part. The debugger will still be active and breakpoints will hit.

Upvotes: 2

Related Questions