Closed jasonpierson closed 2 years ago
:+1: Xdebug stopped working for me too after upgrade VSCode to latest Version: 1.64.2
Hi @jasonpierson ! Sorry, I missed this issue. From mentioning MAMP, I am guessing you are on OSX? I will check with my work Mac tomorrow, but I think everything still works with the latest VS Code.
What I do see is that the log is saying Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port)
but your launch.json
uses "port": 9003
. I do not see a php.ini
setting that would define xdebug.client_port=9000
so I am guessing there is a different php.ini
somewhere in use. You can find all loaded ini files by opening a page with phpinfo();
.
Either find that setting and change it to 9003 or change your launch.json
.
@MatthieuScarset can you provide more context, or even better, please open a new case with requested details.
Changing the port in launch.json
worked. Thanks!
I use MAMP Pro 6.3.3 on port 9000, doesn't seem like I can get VSCode launch.json to listen on it, nothing happens. Do you @jasonpierson also have issues on this version?
PHP version: 8.0 Xdebug version: not sure Output of php -v:
VS Code extension version: 1.23.0 MAMP Pro version: 6.3.1
Your launch.json:
Xdebug php.ini config:
Xdebug logfile (from setting
xdebug.log
in php.ini): don't have one, but this is in my debug.log file in my Wordpress install under wp-content:[09-Feb-2022 03:05:21 UTC] Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(
VS Code extension logfile (from setting
"log": true
in launch.json): there is no log settingCode snippet to reproduce:
The above PHP snippet is from index.php in the root of my local Wordpress install. The error in the debug.log file above occurs multiple times on every page load in the Wordpress installation. It was working fine on PHP 7.3. When I upgraded to PHP 8.0, the errors started.
I am still able to debug using the extension, but the amount of error messages are making the log file pretty large.
UPDATE: after rebooting this morning, I am no longer able to debug using the extension. I can set a breakpoint I know will be hit, start the debugger, load a page and nothing happens.