View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001575||Xdebug||Feature/Change request||public||2018-08-27 08:05||2019-05-24 21:23|
|Target Version||3.0.0dev||Fixed in Version|
|Summary||0001575: API to start/stop debug session at runtime|
|Description||I think it would be usefull to add API access to start/stop debug session at runtime. In my case i use PHP-PM and if debug session not initialized when PM server starts, there has no availability to debug existing PM process. Also we use xdebug proxy and has no availability to change ide_key at runtime in existing PM process.|
|Tags||No tags attached.|
I don't know anything about PHP-PM but I have the same concerns than 0001650 : this ability might bring far more bugs than usefullness: starting debugger twice? starting in the middle of a stack A/B/C/D and getting and error upper in the stack like in A/B might lead to incomplete stack dump, mess with profiler/trace files names, and in this case, what about starting twice with different IDE keys? etc
I don't know what others think tho
As you can see in my commit, i just call xdebug_restart_debugger() . So starting debugger twice just restart session. Same about starting twice with different IDE keys.
"might lead to incomplete stack dump", yes might. But it's API, not a framework. Developer (PHP) will need to be able for understand process flow.
About 9 months we use my fork in our team , because it is convenient. Yes i can't catch some breakpoint's that was executed before xdebug_session_start. I can't get stack dump before. But it's better than restart all server each time when i need to debug. And PHP has no multi-threads out of box.