-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running the server with watch argument breakpoints doesn't work using xdebug #89
Comments
So after a quick investigation, it seems that the issue is not in the server. it comes from The main issue is that the xdebug can't attach to a forked process - I'm not sure why not but it is what it is and I didn't continue it further. |
Amazing research :D Thanks! The thing here is that I don't really find an alternative of using child-process for the php-watcher. |
So the way I see it the main problem here is that there is an issue with xdebug to communicate with a fork of a child-process. The question is why do we use a forked process from the first place? (generally speaking, I don't really like this approach, it is not consistent between different OS types and can cause memory and resource leaks) I assume that the answer is to respawn the server's process on filesystem change events - which is a reasonable approach. Maybe instead of respawning the server's process, we could use only one process which will do both:
In order to achieve that, we would need the ability to re-boot the kernel on-demand in a running process. I'm not sure if the kernel supports such functionality but if so, I believe it will work. Let me know what do you think |
some updates:
|
some updates: Good news! It means that the part of integrating the watcher within the same process of the HTTP-server is feasible and we can avoid using Please note: on PHP environments with no @mmoreram Let me know what do you think about it? |
This is an issue I found while setting up a development environment.
I haven't explored the issue furthermore, and for that reason, I find it important to add this issue here for further investigation.
When setting debug configuration settings (I use PHPStorm) to run a server with a
watch
argument, the server doesn't pause on breakpoints except at thebootstrap.php
file.Important note: the same configuration with a
run
argument works and the program pause at breakpoints.The text was updated successfully, but these errors were encountered: