I had xdebug working previously and then did an update to catalina and suddenly started getting the following message when trying to debug. We have make a few customizations to our copy of trellis to further automate for our clients but nothing huge. Mostly just a new role that gets run only on development after wordpress is finished installing. We do not have the latest version of trellis due to ansible/other conflicts that would cause a lot more work on former projects.
I know that the pathMappings are correct because they were working previously. Here is the error that shows in the Debug Console when trying to start the debuger for a particular profile.
Error: listen EADDRINUSE: address already in use :::9000
at Server.setupListenHandle [as _listen2] (net.js:1306:16)
at listenInCluster (net.js:1354:12)
at Server.listen (net.js:1442:7)
at /Users/kevinmeasom1/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/phpDebug.js:240:24
at new Promise (<anonymous>)
at createServer (/Users/kevinmeasom1/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/phpDebug.js:187:40)
at PhpDebugSession.<anonymous> (/Users/kevinmeasom1/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/phpDebug.js:244:27)
at Generator.next (<anonymous>)
at /Users/kevinmeasom1/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/phpDebug.js:8:71
at new Promise (<anonymous>) {
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 9000
}
I can’t remember if I actually got this error. But xdebug has recently made a major version bump to v3. With that they also switched a lot of config options. I.e. the port switched to 9003.
I have a pull-request up on the trellis-repo that does the necessary changes:
@adambrgmn I tried your solution to apply the updates from the PR on the version bump to v3 for xdebug and nothing worked (I also updated xdebug to v3 on my computer).
I’m no longer receiving the error message when running the debugger but no when I set a breakpoint it doesn’t register that anything is connected, meaning it doesn’t stop at the breakpoint. I’ve tried stopping upon entry and that doesn’t work either.
Hm, sorry I can’t be of more help. My way of getting it to work was by trial and error that led to the PR.
Maybe your local version of xdebug collides somehow with the one from trellis, which runs in its own container? I don’t have it installed locally at least.
Other than that I’m not sure. I guess you’ve done the reprovisioning and everything?