-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Spawning a second PHP process breaks the debugger #231
Comments
Oh, I guess this might be a duplicate of #164. |
I'm same too. Finding a way for this |
I'm posting my answer to what I did to be able to debug my test code. If you can launch the second php with a different remote port, it might solve your problem. |
Hi I observe the same behaviour when running unit tests with atoum. This framework runs a master process, creating a process for each test method. Therefore I got at least 2 PHP processes running. It seems that sometimes I can debug, but in most of my attempts, I forced to stop the debugger or the unit tests currently being debugged. I also observe the same when I run my main project. This is a web application, and most of the time there are 2 nearly concurrent calls to the LAMP server. In this case too, a debug session freezes all requests, but if I try 2 or 3 times, the debug session runs correctly. |
This worked. I added php_value xdebug.remote_port 9001 in 2nd site's directory .htaccess.
|
This also worked for me, adding a second configuration listening on 8000 and then: You can run both configurations more easily if you use a compound configuration: I use Lando as my development environment, which makes this solution a bit easier to implement, and I added it to their docs: |
Old issue. The handling of parallel connections has been reworked a lot in this time. Closing, please reopen with latest log if issue persists. |
I've determined the root cause of #154 and produced a tiny reproducible example. It's not related to PHPUnit, it's caused by a call to
system()
which spawns a second PHP process and causes the VS Code debugger to malfunction.Running the test case below will cause the debugger to get "stuck", with two requests appearing in the call stack panel and nothing else functional apart from the Stop button.
Steps to reproduce:
1.php
and launch the VS Code debugger.php 1.php
on the command linePHP version: 7.1.0
XDebug version: 2.5.5
Adapter version: 1.12.1
Your launch.json:
XDebug php.ini config:
The text was updated successfully, but these errors were encountered: