Alexandr Torsunov
Alexandr Torsunov

Reputation: 1

Xdebug connection breaks instantly in PhpStorm

Xdebug stopped working in PhpStorm. The connection is lost in less than a second. I connect to Xdebug via SSH. I have attached a video with the bug. I will be grateful for any help.

bug video (google disk)

Upvotes: 0

Views: 884

Answers (1)

LazyOne
LazyOne

Reputation: 165471

General approach in troubleshooting here:

  1. Enable Xdebug log (most likely will need to restart your web server/php-fpm) and try to debug again. Then check the log to see if it was a clean exit or it just died/process terminated. Maybe Xdebug is crashing.

  2. You may also enable extra logging on PhpStorm end to see their side of things. Then you can check the idea.log via PhpStorm | Help | Show Log in XXX

P.S. Just in case: see if disabling Settings (Preferences on macOS) | PHP | Debug | Enable '__toString' object view option will make any difference. PhpStorm 2022.2 has implemented this functionality but it looks like not all corner cases may be covered yet.


Since disabling the Enable '__toString' object view option helped, then please check out the 2022.3 EAP version -- EAP builds have a few tickets fixed in this area.

Since it works OK for you in 2022.3 EAP build then it could be one of these tickets (cannot say which one without knowing the code / seeing the logs etc.):

  • WI-68096 -- '__toString' in Debugger triggers custom error handler
  • WI-68622 -- Enable '__toString() object view': code that reads from stream ends early under debugger

Upvotes: 2

Related Questions