Answer the question
In order to leave comments, you need to log in
How to set up xdebug in vscode if the project is inside a virtual machine and is raised via docker there?
VSCode is installed on Windows, via Remote-SSH there is a connection to the server, which is raised in VirtualBox.
Docker is installed on the server and the project will rise through docker, in the ini file there are the following xdebug settings:
[xdebug]
zend_extension=xdebug.so
xdebug.profiler_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
/srv/projects/www
in the virtual machine to the path /var/www/html
in the container through the volume. {
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
"externalConsole": false,
"pathMappings": {
"/var/www/html": "${workspaceRoot}",
},
"ignore": [
"**/vendor/**/*.php"
],
},
${workspaceRoot}
Tried absolute path
instead /srv/projects/www
, doesn't help. Yes, and the workspace must be correct, I connect to the project folder. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question