Xdebug: [Step Debug] Time-out connecting to debugging client #3756

Closed
opened 2026-02-05 07:20:53 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @esakkiraja100116 on GitHub (Apr 22, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Documentation

When I execute docker-compose up command it will throw the timeout error

Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client_host/xdebug.client_port).

This is what I tried to solve

image

After running the xdebug listener in vscode it will throw the same error again

@ssddanbrown

Exact BookStack Version

v23.02.3

Log Content

No response

PHP Version

No response

Hosting Environment

Ubuntu 22.10 [desktop version]

Originally created by @esakkiraja100116 on GitHub (Apr 22, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario [`Documentation`](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/development.md#development-using-docker) When I execute `docker-compose up` command it will throw the timeout error ``` Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: host.docker.internal:9000 (through xdebug.client_host/xdebug.client_port). ``` This is what I tried to solve ![image](https://user-images.githubusercontent.com/57084732/233777985-22f711c3-8a64-4e5a-a3ec-0f38fb747370.png) **After running the xdebug listener in vscode it will throw the same error again** @ssddanbrown ### Exact BookStack Version v23.02.3 ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment Ubuntu 22.10 [desktop version]
OVERLORD added the 🐕 Support label 2026-02-05 07:20:53 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 22, 2023):

@esakkiraja100116 As per the linked docs, we use 9090 for xdebug, have you tried using that instead of the 9000 you have configured in your screenshot?

@ssddanbrown commented on GitHub (Apr 22, 2023): @esakkiraja100116 As per the linked docs, we use `9090` for xdebug, have you tried using that instead of the `9000` you have configured in your screenshot?
Author
Owner

@esakkiraja100116 commented on GitHub (Apr 22, 2023):

image

Yes I know @ssddanbrown . But I changed in the configuration file

@esakkiraja100116 commented on GitHub (Apr 22, 2023): ![image](https://user-images.githubusercontent.com/57084732/233779118-e519e8f4-e143-481e-8d91-f1243cc78398.png) Yes I know @ssddanbrown . But I changed in the configuration file
Author
Owner

@esakkiraja100116 commented on GitHub (Apr 22, 2023):

FYI,

image

@esakkiraja100116 commented on GitHub (Apr 22, 2023): FYI, ![image](https://user-images.githubusercontent.com/57084732/233779375-51c84eff-b4cb-4be1-9c7b-34ce2275dbcd.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 23, 2023):

I just tested this using the dev docker setup and vscode.
Looks like you have your mappings the wrong way around. Needs to be like this:

        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9090,
            "pathMappings": {
                "/app": "${workspaceFolder}"
            }
        },

Also note, you may get stuck at database migrations (as seen at your last screenshot) unless you change/add the APP_ENV in your .env file (You can add APP_ENV=development).

@ssddanbrown commented on GitHub (Apr 23, 2023): I just tested this using the dev docker setup and vscode. Looks like you have your mappings the wrong way around. Needs to be like this: ```json { "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 9090, "pathMappings": { "/app": "${workspaceFolder}" } }, ``` Also note, you may get stuck at database migrations (as seen at your last screenshot) unless you change/add the `APP_ENV` in your `.env` file (You can add `APP_ENV=development`).
Author
Owner

@esakkiraja100116 commented on GitHub (Apr 23, 2023):

Thanks for your guidance @ssddanbrown 🙏. I added APP_ENV=development in .env file. Then I got the login page in localhost:8080 😍

image

But still the error is not solved for me,

image

@esakkiraja100116 commented on GitHub (Apr 23, 2023): Thanks for your guidance @ssddanbrown 🙏. I added `APP_ENV=development` in `.env` file. Then I got the login page in `localhost:8080` 😍 ![image](https://user-images.githubusercontent.com/57084732/233853988-28cf285a-1762-4545-a7f3-5009849a10f3.png) But still the error is not solved for me, ![image](https://user-images.githubusercontent.com/57084732/233855108-8fc53de3-ff4b-4591-836d-a79f71694f83.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 23, 2023):

It's hard to understand where those messages are being logged from, I'd expect to see requests in between those in normal docker logs output.

  • Revert the changes you've made to the xdebug.ini file and any other docker-related file in your project.
  • Are the those messages being logged upon reloading the page or are they continuous?
  • What exactly are you running in that terminal table to view those logged messages?
  • Have you tested setting a breakpoint within running code?
@ssddanbrown commented on GitHub (Apr 23, 2023): It's hard to understand where those messages are being logged from, I'd expect to see requests in between those in normal docker logs output. - Revert the changes you've made to the `xdebug.ini` file and any other docker-related file in your project. - Are the those messages being logged upon reloading the page or are they continuous? - What exactly are you running in that terminal table to view those logged messages? - Have you tested setting a breakpoint within running code?
Author
Owner

@esakkiraja100116 commented on GitHub (Apr 25, 2023):

  • Changes reverted in xdebug.ini file.
  • Your assumption is right while reloading the pages, it will throw the error.
  • I'm running the UNIT test command docker-compose run app php vendor/bin/phpunit.
  • Yes, I tested through CLI itself.

image

@esakkiraja100116 commented on GitHub (Apr 25, 2023): - Changes reverted in `xdebug.ini` file. - Your assumption is right while reloading the pages, it will throw the error. - I'm running the UNIT test command `docker-compose run app php vendor/bin/phpunit`. - Yes, I tested through CLI itself. ![image](https://user-images.githubusercontent.com/57084732/234235627-caecc8fd-9c97-4456-a445-6b5c6961fc09.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 25, 2023):

Not sure what else to suggest to be honest. You could try dropping off that VPN before attempting anything, just to ensure that's not mixing things up since this could likely be a docker networking issue.
Otherwise check that you can resolve host.docker.internal from inside the container.

@ssddanbrown commented on GitHub (Apr 25, 2023): Not sure what else to suggest to be honest. You could try dropping off that VPN before attempting anything, just to ensure that's not mixing things up since this could likely be a docker networking issue. Otherwise check that you can resolve `host.docker.internal` from inside the container.
Author
Owner

@esakkiraja100116 commented on GitHub (Apr 25, 2023):

Yes, It's a docker networking issue. Seems it like a firewall is blocking the incoming connection, So I added rules in iptables then it's working fine.

Issue_fixed

Credits goes to chatGPT 🔥

@esakkiraja100116 commented on GitHub (Apr 25, 2023): Yes, It's a docker networking issue. Seems it like a firewall is blocking the incoming connection, So I added rules in `iptables` then it's working fine. ![Issue_fixed](https://user-images.githubusercontent.com/57084732/234318897-aa9af902-abce-49e0-9b8c-9585f1de7cce.png) Credits goes to chatGPT :fire:
Author
Owner

@aygupt1822 commented on GitHub (Apr 22, 2024):

@esakkiraja100116
Hey can you tell me how did you solved this problem ?
I am having the exact issue.

@aygupt1822 commented on GitHub (Apr 22, 2024): @esakkiraja100116 Hey can you tell me how did you solved this problem ? I am having the exact issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3756