View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000955||Xdebug||Feature/Change request||public||2013-06-25 13:40||2016-12-14 08:55|
|Target Version||Fixed in Version|
|Summary||0000955: provide a profiler API for xdebug|
|Description||In the .NET world there's something called profiler API. This extension is very low level (in terms of .NET code) but it gives programmers very interesting features: it allows for example to register callbacks on any function, method invocation or property access. It's like events for function calls: onCall, onReturn etc. - with the ProfilerAPI you could for example skip the call, modify its return value, fiddle with its parameters and the like or stub the whole invocation with a function of your choice.|
Of course in terms of xdebug it would allow to create listeners to build one's own tool sets for tracking and examining call graphs and the like. Right now we are stuck with the tracking file xdebug generates.
My motivation for such an extension would be different though: one of the limitation of PHP language is that it is very difficult to mock or stub any static, final functions. Such extension would allow for a completely new generation of isolation (mock) frameworks with similar capabilities like those of Typemock Isolator but in the PHP world.
Ideally the hooks could be used from the PHP Code e.g. regular php code to be registered as onCall or onReturn handlers.
|Tags||No tags attached.|
Here's how the profiler API was exploited at Typemock.
||Are you still interested in this? I have not had anybody else ask about it, and I also don't really feel like this is a debugging tool. It is much more like runkit or something like that.|
Thanks for taking time to review this suggestion.
Well while I appreciate your point that this proposal goes beyond what's traditionally considered a debugging feature on the other hand if a debugger was not able to "peek'n'poke" program variables? By changing a variable value you alternate the control flow. Why would that be so much different from changing the program itself which by the way is considered data as well in some programing paradigms?
|2013-06-25 13:40||najcik||New Issue|
|2013-06-25 13:54||najcik||Note Added: 0002523|
|2016-12-13 21:11||derick||Note Added: 0004045|
|2016-12-13 21:11||derick||Assigned To||=> derick|
|2016-12-13 21:11||derick||Status||new => feedback|
|2016-12-14 08:55||najcik||Note Added: 0004064|
|2016-12-14 08:55||najcik||Status||feedback => assigned|