Unfortunally I can't seem to get compounds launched in vscode with PHP Tools. A compound is a way to start multiple launch.json configurations at once. Here is an example of a launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch App",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-S",
"localhost:8000",
"-t",
"myproject-app/public_html/."
],
"runtimeExecutable": "c:\\xampp\\php70\\php",
"port": 9000
},
{
"name": "Launch API",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-S",
"localhost:8080",
"-t",
"myproject-api/public_html/."
],
"runtimeExecutable": "c:\\xampp\\php70\\php",
"port": 9000
}
],
"compounds": [
{
"name": "Launch App & API",
"configurations": ["Launch App", "Launch API"]
}
]
}
When I start the compound "Launch App & API" it will give this error:
connect ECONNREFUSED 127.0.0.1:64084
The error seems to be from Chrome, which is reasonable since the launch compound tries to launch Chrome twice. But the problem is that a request of type attach
is not possible with PHP (Tools).
It would be very helpful if a compound of two PHP launch configurations could be started in vscode. As a workaround I now start one of the launch configurations and start the second in the terminal. Since this works, I am sure the problem is not in PHP, its internal webserver or XDebug.
Thank you.