Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Eclipse Xdebug two or more requests at a time

I cannot find any info on this anywhere. I have a long running process triggered by a HTTP request, and then another short process triggered by a HTTP request that checks the status of the long running process. Both are called via AJAX. The first by a button click, and the second on a continuous timeout.

If I run the requests one at a time, then they work. The problem is, when running the first process, Eclipse completely ignores the second request (if the first hasn't finished), but I need the second request to be debugged whilst the first request is still being processed

I've even tried running the first process independently of the debugger, and just trying to use the debugger for the second process. However I just cant seem to catch the second process in the debugger like I can the first.

Ideally I'd like to be able to debug 2 or more processes simultaneously.

It appears this can be done using Eclipse and Java. However PHP support is looking pretty thin.

like image 498
AlexMorley-Finch Avatar asked Dec 02 '13 10:12

AlexMorley-Finch


People also ask

Does xdebug slow PHP?

Yes, debuggers like XDebug reduce the performance of the PHP server. This is the reason why debuggers are not placed in server environment. They are deployed in a different environment to avoid unnecessary overheads.

How does PHP xdebug work?

When Xdebug is running, it will call back to your IDE (like PhpStorm or VS Code) from the server where it's running. Your IDE will sit and listen for that connection on a specific port (typically port 9000 or 9003).


1 Answers

You will need to activate xdebug.remote_autostart = 1 in the xdebug.ini file and also you need to activate the xdebug multisession and remove session Multisession

like image 175
Patricio Rossi Avatar answered Sep 17 '22 21:09

Patricio Rossi