View Issue Details

IDProjectCategoryView StatusLast Update
0001575XdebugStep Debuggingpublic2021-03-17 11:59
Reporterjekans Assigned Toderick  
Status resolvedResolutionwon't fix 
Summary0001575: API to start/stop debug session at runtime
DescriptionI 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.
TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4


has duplicate 0001650 resolvedderick Add possibility to start/stop debugger from PHP 



2019-05-16 13:43

reporter   ~0005027

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


2019-05-24 21:23

reporter   ~0005031

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.

Thank tou.


2021-03-17 08:58

administrator   ~0005733

I'm not willing to open this can of worms , so I'm marking this as "won't fix".


2021-03-17 11:59

reporter   ~0005784

Can you give some instruments for start and stop debug session after PHP process starts? Maybe in future releases?

As i wrote, there is scenarios when PHP using as selfserved webserver, not served by nginx/php-fpm or other. Or when PHP using as daemon.

In this cases i need restart whole PHP server/daemon to start debug session. And same for stopping debug session.

Issue History

Date Modified Username Field Change
2018-08-27 08:05 jekans New Issue
2019-05-16 13:43 Xenos Note Added: 0005027
2019-05-17 10:18 derick Relationship added has duplicate 0001650
2019-05-17 10:18 derick Target Version => 3.0dev
2019-05-24 21:23 jekans Note Added: 0005031
2019-06-28 11:19 derick Status new => acknowledged
2020-03-12 16:43 derick Category Feature/Change request => Step Debugging
2020-09-23 17:04 derick Target Version 3.0dev =>
2021-03-17 08:58 derick Assigned To => derick
2021-03-17 08:58 derick Status acknowledged => resolved
2021-03-17 08:58 derick Resolution open => won't fix
2021-03-17 08:58 derick Note Added: 0005733
2021-03-17 11:59 jekans Note Added: 0005784