Disabling Xdebug connections

Hi, all.

I'm using Xdebug with PHPStorm / Chrome without any problems. Everything works fine when debugging.

The issue is the performance with the debugger is pretty poor on my development server. I've tried a couple of things for disabling the Xdebug connection including simply clicking the debug icon to disable debugging, but Chrome always tries to connect to PHPStorm regardless. That's true even when PHPStorm isn't even running. The only difference is the error log gets filled with complaints about the connection failing.

Since this is a web app, that means the performance is always poor. Completely removing Xdebug from the php.ini file resolves the performance and connection problems, but makes it impossible to quickly switch between debugging and non-debugging mode.

Any ideas for getting Chrome to stop trying to connect when Xdebug is disabled in PHPStorm?

See screenshot link below:

https://monosnap.com/file/9V2txBV9mlJyMFW3uf8xhfv3MSU2Fy

 

0
4 comments

Hi Chris,

What values are set in the php.ini file for the xdebug.mode, xdebug.start_with_request and xdebug.start_upon_error?
 

0

It's pretty minimalist. Basically, the fewest entries that allowed everything to work for debugging.

; -----------------------------------------------------------------------------
; Headlight: Xdebug V3 Configuration
; -----------------------------------------------------------------------------
[xdebug]
zend_extension = xdebug
xdebug.mode = debug
; xdebug.client_host=127.0.0.1
; xdebug.client_port=9003
 

0

When the Xdebug Helper is in the ‘Disable’ mode and the Xdebug mode is trigger, the session is not established:

If it still doesn't work this way for you for some reason, please configure the Xdebug log with the xdebug.log_level = 7, reproduce the issue and share this log file via https://uploads.jetbrains.com/.

0

Ah, I didn't know there was a replacement for the deprecated plug-in.

Just installed it and will spend some time testing tomorrow, thx!

==========

For anyone else seeing this post…

The original Xdebug Helper Chrome extension has been deprecated and is no longer supported, as Chrome has turned it off due to its incompatibility with modern extension standards. This has disrupted workflows for many PHP developers who relied on it for easy debugging, profiling, and tracing of PHP code.

To address this, JetBrains has developed a new, modern, and cross-browser extension called Xdebug Helper by JetBrains. This extension is designed to replace the legacy tool and works with Chrome, Firefox, and Microsoft Edge. It allows developers to toggle debugging, profiling, and tracing with a single click or keyboard shortcut, eliminating the need to manually add query parameters or manage cookies. The extension is open-source and licensed under the MIT license, with active maintenance and development by JetBrains in collaboration with the original creator, Fraser Chapman.

An alternative option is the Xdebug Chrome Extension, a fork of the original Xdebug Helper that has been updated to fix bugs and is available on the Chrome Web Store. It is also open-source and can be used for step debugging, profiling, and tracing PHP web pages.

For developers using JetBrains IDEs like PhpStorm, an alternative approach exists: Xdebug can be configured to start automatically with requests by setting xdebug.start_with_request=yes in the xdebug.ini configuration file. This allows debugging to begin without needing a browser extension, provided the IDE is set to listen for incoming debug connections.

In summary, the original Xdebug Helper Chrome extension is obsolete. Developers are advised to switch to the Xdebug Helper by JetBrains for a supported, cross-browser solution, or consider the Xdebug Chrome Extension as an alternative.

0

Please sign in to leave a comment.