I Try to use xdebug in Windows 10.
I had used xdebug in My Mac machine.
But, In windows 10, I installed xdebug 2.9.8 then config it.
It does not work as I thought.
Below is my php.ini
; XDEBUG Extension
[xdebug]
zend_extension = c:\wamp64\bin\php\php7.1.33\ext\php_xdebug.dll
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.remote_host='127.0.0.1'
xdebug.remote_port=9003
xdebug.log="c:/wamp64/logs/xdebug.log
I confirmed it was intalled correctly using php -v
Then I installed php-debug extension in my vscode.
and then my apache vhost is like below.
<VirtualHost *:80>
ServerName hello.localhost
DocumentRoot "${INSTALL_DIR}/www/hello"
<Directory "${INSTALL_DIR}/www/hello/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
This is all my settings about debugging php.
My expectation is to trigger browser to xdebug server running in vscode When I request to my apache hosts hello.localhost.
But It does not work.
I confirmed any other script worked well for debugging scripts such as debugging current scripts and built-in server configs automatically configured in php-debug extension.
I wanna to try is Listen for xdebug script in vscode. It does not work.
What does I have to configure more?
And below is my vscode configure for xdebug.
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
}


Verify that you have first well linked your vHost with your Xdebug
You should then have
xdebug.client_host=127.0.0.1orxdebug.client_host=hello.localhostenabled in yourPHP.INI.Also make sure that you have disabled Zend OPCACHE extension.
Call
xdebug_info();on a PHP page and verify all these settings.Finally, call the page you want to debug by adding
?XDEBUG_SESSION=1to your querystring or callxdebug_break();directly in your code.