I'm trying to debug code that is on remote server.
I'm using
So, when
Xdebug connection is established by
ssh -R 9000:localhost:9000 {username}@{serverhost}
Xdebug helper in debug mode
Xdebug triggers to each requests not only from my browser or PhpStorm, but from all other users from the internet.
Is it normal?
Is it possible to watch only requests initiated from my PhpStorm or from my Chrome requests? If yes, so how to setup?
Xdebug triggers to each requests not only from my browser or PhpStorm, but from all other users from the internet.
Is it normal?
That depends on your Xdebug configuration. Right now it looks like it's configured to automatically attempt to debug every single request (not a good idea in many situations).
Is it possible to watch only requests initiated from my PhpStorm or from my Chrome requests? If yes, so how to setup?
Yes, make sure that xdebug.remote_autostart
is turned off (set to 0
/no
).
Then just follow the official guide: https://www.jetbrains.com/help/phpstorm/debugging-with-phpstorm-ultimate-guide.html
Xdebug will see your Xdebug cookie set by Chrome Xdebug Helper (or GET/POST parameter if you pass it manually in URL/request) and will try to debug only those requests.
P.S. There is another scenarios where the aforementioned option will not help.. but so far it does not look like you are having that case (would need to see much more details for that).